Skip to content
  • Facebook
GeekCer Logo

GeekCer

The geek's Coding education and Review centre

  • Home
  • Tutorials
    • Java
    • Servlet
    • JSP
    • Python
    • C Tutorial
    • Spring
    • Spring Boot
    • MongoDB
    • Hibernate
    • Data Structure
  • General Knowledge
  • Biography
  • Grammar
  • Festival (त्योहार)
  • Interview
  • Differences
  • Important
  • Toggle search form

Home » Java » Collections in Java

  • Ohms law Definition, Formula, Statement
    Ohms law Definition, Formula, Statement | ओम का नियम Science
  • जन्माष्टमी व्रत पूजा विस्तार से | दही हांडी | Krishna Janmashtami Puja
    जन्माष्टमी व्रत पूजा विस्तार से, दही हांडी: Krishna Janmashtami Puja Festival
  • Christmas Day Celebration
    Christmas Day Celebration | Story about Christmas day Festival
  • Famous Slogans given by famous Personalities Indian leaders
    Famous Slogans of freedom fighters in Hindi | स्वतंत्रता सेनानियों के प्रसिद्ध नारे हिंदी में General Knowledge
  • MS Dhoni (Mahendra singh Dhoni) Cricket Biography in Hindi
    MS Dhoni (Mahendra singh Dhoni) Cricket Biography in Hindi Biography
  • Subhas Chandra Bose Biography in Hindi, Essay, Paragraph
    Subhas Chandra Bose Biography in Hindi, Essay, Paragraph Biography
  • Ayodhya Kand in Hindi | अयोध्या काण्ड | राम को 14 वर्ष का वनवास
    Ayodhya Kand in Hindi | अयोध्या काण्ड | राम को 14 वर्ष का वनवास Spiritual
  • Chemical Properties of Matter (Element, Compound and Mixture)
    Chemical Properties of Matter examples (Element, Compound and Mixture) Science

Collections in Java

Posted on August 16, 2021October 20, 2021 By GeekCer Education No Comments on Collections in Java
Collections in Java

A Collections in Java is an object that can store a group of other objects. There is an another term of collection object is container object. Java Collections may store same type as well as different type of data.

Collection object does not store the physical copies of other objects because the objects are already available in memory. It simply stores the references of other objects into collection object.

Collections in Java contains different methods to perform different operations, for example, it stores, retrieves and manipulates data by using those methods.

Table of Contents

  • Collection Framework
    • Basic Interfaces of Collection Framework
  • Advantages of Collections over Arrays in Java
      • Conclusion

Collection Framework

A collection framework is actually a class library which handles groups of objects and it defines several classes and interfaces, which represents group of objects as a single unit.

Basic Interfaces of Collection Framework

All the collection classes and interfaces are available in java.util package. Here is the following key interface of collection interface

#InterfacesDescription
1CollectionCollection Interface is a root interface of collection framework.
2ListList preserves insertion order and can contain the duplicates.
3SetSet does not preserve insertion order and also does not contains the duplicates.
4SortedSet SortedSet does not preserve insertion order and does not contain duplicates, but stores the elements in some sorting order.
5QueueHolds elements prior to processing.
6MapMap stores a group of objects but in the form of key-value pairs.
7SortedMapStores a group of objects as key-value pairs, but according to some sorting order.

Advantages of Collections over Arrays in Java

There are following key advantages of collections over arrays which are as follow:

  • Size of collection can be increase or decrease because collections are growable in nature.
  • Collections can hold multiple types of objects homogeneous as well as heterogeneous.
  • In every collection there are some ready-made method support is available, because of those methods we can manipulates the data.

Memory point of view Collections is better than Array concept.

Performance point of view Array concept is better than Collections.

Conclusion

In conclusion, the programmer should decide which collection is helpful for handling the data plan he is creating in his software.

Share this:

  • Click to share on Facebook (Opens in new window)
  • Click to share on WhatsApp (Opens in new window)
  • Click to share on Twitter (Opens in new window)
  • More
  • Click to share on LinkedIn (Opens in new window)
  • Click to share on Pinterest (Opens in new window)

Also Read

Java

Post navigation

Previous Post: Object Oriented Programming
Next Post: Java ArrayList

More Related Articles

Difference between JPanel and JFrame Difference between JPanel and JFrame Differences
Concurrent collections in Java, details, advantages, examples Concurrent collections in Java, details, advantages, examples Java
Difference between Interface and Abstract class Difference between Interface and Abstract class Differences
Java Switch Case Java Switch Case : Switch fall-through, default, break, examples Java
Method Overloading in Java Method Overloading in Java Java
Loop in Java Loop in Java, Looping statements in java (for, while, do..while) Java

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

  • Java Home
  • Java Comments
  • Java Variables
  • Java Data Types
  • Java Keywords
  • Java Operators
  • Java If-else Statement
  • Java Switch
  • Java Loop
  • Java Arrays
  • Method Overloading in Java
  • Java OOP
  • Java Collections
  • Java ArrayList
  • Java LinkedList
  • Java Vector
  • Multithreading in java
  • Thread Synchronization
  • Exception Handling
  • Java JDBC Driver
  • Java Database Connectivity steps
  • Lambda Expressions
  • Concurrent Collections
  • National Farmers Day in Hindi | राष्ट्रीय किसान दिवस पर निबंध | चौधरी चरण सिंह जयंती
  • Human rights day in Hindi: 10 दिसंबर ह्यूमन राइट्स डे
  • Unicef day is celebrated on December 11 | Speech on unicef day
  • Indian Navy Day: जल सेना दिवस कब और क्यों मनाया जाता है?
  • P V Sindhu Biography in Hindi, Badminton, State, Caste पी. वी. सिंधु जीवन परिचय, कहानी, राज्य, जाति
  • Draupadi Murmu Biography In Hindi | द्रौपदी मुर्मू की जीवनी
  • IPv4 Vs IPv6 | Difference between IPv4 and IPv6
    IPv4 Vs IPv6 | Difference between IPv4 and IPv6 Differences
  • Network kya hai (नेटवर्क क्या है)
    Network kya hai (नेटवर्क क्या है) Networking
  • Difference between Internet and Intranet
    Difference between Internet and Intranet Differences
  • TCP/IP Model, Full Form, Layers and their Functions
    TCP/IP Model, Full Form, Layers and their Functions Networking
  • OSI Model | 7 Layers of OSI Model in Computer network
    OSI Model | 7 Layers of OSI Model in Computer network, Functions Networking
  • Similarities and difference between OSI and TCP/IP model
    OSI vs TCP/IP Model, Similarities and difference between OSI and TCP/IP model Networking
  • Difference between TCP and UDP
    Difference between TCP and UDP | TCP vs UDP examples Differences
  • Java Tutorial
  • Servlet Tutorial
  • JSP Tutorial
  • Maven Tutorial
  • HTML Tutorial
  • Programs
  • Hindi/English Grammar
  • Difference Between ... and ...
  • HR Interview
  • Important Articles

Write to Us:
geekcer.code@gmail.com

  • About Us
  • Privacy and Policy
  • Disclaimer
  • Contact Us
  • Sitemap

Copyright © GeekCer 2022 All Rights reserved