Collections in Java…

Collection Interface Methods in java

Interfaces that extend the collection interface are-

1. Iterable Interface:-

Iterator<type> iterator();

2. Collection Interface are :-

List <object_type> list=new LinkedList();

List <object_type> list=new ArrayList();

List <object_type> list=new Vector();

List <object_type> list=new Stack();

Set <data_type> set =new HashSet<>();

Set <data_type> set =new LinkedHashSet<>();

Set <data_type> set =new TreeSet<>();

Queue<String> queue=new PriorityQueue();

Queue<String> queue=new ArrayDeque();

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store