understanding date handling and collection framework
DESCRIPTION
Gives a brief usage of Dates in java followed by collection frameworkTRANSCRIPT
![Page 1: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/1.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
java.util and CollectionFramework
![Page 2: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/2.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
• This presentation is for teaching purpose only.
• This presentation may contain some material from books / api documentation / internet.
• No intention of breaking any rights or what so ever.
![Page 3: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/3.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Date and Time Related Classes
• Date
• TimeZone
• Calendar
• GregorianCalendar
• Epoch : 1st Jan 1970 0:0:0.0 GMT
– 1st January 1970 5:30:0.0 IST
![Page 4: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/4.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Simple Program
????????? toString()
![Page 5: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/5.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Constructor
![Page 6: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/6.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Comparing Date
![Page 7: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/7.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Calendar
• Abstract Class
• No public constructor
• day, month, year, hour, minutes , seconds, era
• Many int constants
• Many methods
![Page 8: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/8.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 9: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/9.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Some Methods
![Page 10: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/10.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
TimeZone
• Class
• Maintains offset value
• ID for instances
• public static TimeZone getDefault()
• public static void setDefault(TimeZone zone)
![Page 11: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/11.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 12: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/12.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
• public String getId()
• public String getDisplayName()
• public int getOffset(long date)
• public int getRawOffset
• public void setRawOffset(int offmilliseconds)
• public static TimeZone getTimeZone(String ID)
![Page 13: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/13.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 14: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/14.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 15: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/15.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 16: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/16.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 17: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/17.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
GregorianCalendar
• Concrete class of Calendar
• Two fields AD and BC for era
• 7 constructors
• GreogrianCalendar gc = new GregorianCalendar();
– Current date and time in default locale and time zone
![Page 18: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/18.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
GregorianCalendar
• Ff
Year = Number of year elapsed from 1900
Month = 0 indicating Jan
![Page 19: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/19.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
GregorianCalendar
fd
• boolean isLeapYear(int year)
– Test for leap year
![Page 20: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/20.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
DateFormat
![Page 21: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/21.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 22: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/22.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 23: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/23.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Array Class
• Contains various methods for manipulating arrays - mostly static methods
• Contains a static factory that allows arrays to be viewed as lists.
• fill, equals, sort, binarysearch, toString
![Page 24: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/24.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
fill method
• public static void fill(datatype[] array, datatype value)
• public static void fill(datatype[] array, int fromindex , int toindex, datatype value)
• datatype = Primitive Datatype + Object
![Page 25: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/25.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Program
![Page 26: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/26.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Output
![Page 27: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/27.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
fill()
![Page 28: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/28.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
fill()
![Page 29: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/29.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
equals()
• Return Boolean
• Take two arguments
• public static boolean equals( datatype [] a, datatype[] b)
• Compare each element and size of array
![Page 30: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/30.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
equals()
![Page 31: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/31.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
sort()
• Sort the array
• Ascending Order
![Page 32: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/32.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
sort()
![Page 33: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/33.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
binarySearch()
• Uses binary search method to find the index of element
• Prerequisites : Sorted Array
![Page 34: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/34.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
binarySearch()
![Page 35: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/35.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Collection Framework
• Standardizing and having interoperability between various data structures
• Introduced in Java 1.2
• Relies on Standard interfaces
![Page 36: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/36.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Collection Framework
• Eight generics interfaces type
– Determined the common methods for all collection class
• Operations
– Basic Operations
– Array Operations
– Bulk Operations
![Page 37: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/37.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 38: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/38.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Basic Operations
![Page 39: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/39.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Basic Operations
![Page 40: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/40.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Array Operations
![Page 41: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/41.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Bulk Operation
![Page 42: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/42.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Iterator
• Lets you cycle through collection
![Page 43: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/43.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Example
![Page 44: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/44.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Set Interface
• Defines a set
• Collection of unique element [ no duplication]
• Extends the Collection
– All the methods
• HashSet and TreeSet are concrete classes
• AbstractSet : base abstract class
![Page 45: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/45.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
List Interface
• Extends Collection
• Insertion, updating, all are index based
• Index starts from 0
• It can store duplicates value
• It adds its own methods
![Page 46: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/46.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Methods
![Page 47: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/47.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Methods
![Page 48: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/48.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Methods
![Page 49: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/49.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
List Iterator
• public interface ListIterator<E> extends Iterator<E>
• A ListIterator has no current element; its cursor position always lies between the element that would be returned by a call toprevious() and the element that would be returned by a call to next().
• An iterator for a list of length n has n+1 possible cursor positions,
![Page 50: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/50.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
List Iterator
•
![Page 51: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/51.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 52: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/52.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 53: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/53.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
List Iterator
• In general, to use an iterator to cycle through thecontents of a collection, follow these steps:
1.Obtain an iterator to the start of the collection by calling the collection’s iterator( ) method.
2.Set up a loop that makes a call to hasNext( ). Have the loop iterate as long as hasNext( ) returns true.
3.Within the loop, obtain each element by calling next( ).
![Page 54: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/54.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 55: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/55.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
• Dynamic Array
– The size of a Vector can grow or shrink as needed to accommodate adding and removing items after the Vector has been created
• Synchronized
• Each vector tries to optimize storage management by maintaining a capacity and a capacityIncrement
![Page 56: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/56.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
• Modified from Java 1.2 [ IS IT SAME AS JAVA 2]
• To implement List and become part of Collection Framework
![Page 57: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/57.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class Constructors
• The increment specifies the number of elements to allocate each time that a vector is resized upward.
Initial Size 10
![Page 58: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/58.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
• Starts with initial capacity
• Allocates more space for new objects once the capacity is reached
• It allocates more space that required so allocation is done minimal time
• Double size if nothing is specified
• What if incr size = 0 [ Default Value]
![Page 59: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/59.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 60: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/60.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 61: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/61.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 62: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/62.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 63: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/63.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 64: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/64.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 65: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/65.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Vector Class
![Page 66: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/66.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 67: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/67.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Now Lets add elements
• addElement(Object o)
• Size = ? Capacity = ?
![Page 68: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/68.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
• Size = 4 Capacity = 5
– WHY
• Size = ? Capacity = ?
• 5,5
• 5,8
• Any Other Option
![Page 69: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/69.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 70: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/70.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 71: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/71.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
![Page 72: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/72.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Solution : Generics
• <Object>
– Specifies the data type
• Vector<String> v = new Vector<String> ();
• Vector<Rectangle> v = new Vector<Rectangle> ();
![Page 73: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/73.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Printing Vector
![Page 74: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/74.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
One Example
![Page 75: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/75.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Lets Create Vector
• Size = ?? Capacity = ??
• DEFAULT = 10
![Page 76: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/76.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Will This Work !!!
![Page 77: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/77.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
How to Print area ?
![Page 78: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/78.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Stack
![Page 79: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/79.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
ArrayList
![Page 80: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/80.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
ArrayList
• Resizable-array implementation of the List interface.
• Implements all optional list operations, and permits all elements, including null.
• This class is roughly equivalent to Vector, except that it is unsynchronized.
![Page 81: Understanding Date Handling and Collection Framework](https://reader034.vdocuments.us/reader034/viewer/2022042614/55581586d8b42a25588b4620/html5/thumbnails/81.jpg)
Prof. Ashish Bhatia Available at : http://www.asbspace.in/ppt
Map Interface
• Continued to Next Presentation