Describe the java collections framework? , JAVA Programming

Assignment Help:

Comparable interface: The "Comparable" allows itself to compare with other same types of object. The function compareTo() is specified in the interface.

Several of the standard classes in the Java library like String, Date, Integer, File etc implement the Comparable interface to provide the class a "Natural Ordering".

 For example String class describes the following methods:

public int compareTo(o)

public int compareToIgnoreCase(str)

 

Comparator interface: The Comparator is needed to compare two distinct objects. The following function is specified in the Comparator interface.

public int compare(Object l1, Object l2)

 

606_Untitled.png

 

 

There are the benefits of the Java Collections Framework.

Java Collections framework gives performance, flexibility, and robustness.

1. Polymorphic algorithms - sorting, binary search, reversing, shuffling etc.

2. Set algebra - such as finding subsets, unions, and intersections between objects.

3. Performance - collections have much better performance compared to the Hashtable classes and older Vector with the elimination of synchronization overheads.

4. Thread-safety - when synchronization is needed, wrapper implementations are gives for temporarily synchronizing existing collection objects.

5. Immutability - when immutability is needed wrapper implementations are given for building a collection immutable.

6. Extensibility - abstract classes and interfaces give an excellent starting point for adding functionality and features to prepare specialized object collections.

 


Related Discussions:- Describe the java collections framework?

Hospital management system in java-jsp, Hospital Management System: Te...

Hospital Management System: Technology Used Java-JSP, Apache Tomcat (webserver), SQL SERVER 2000. This project is aimed at developing a web-based system for taking records

Support for web and enterprise web applications, Support for Web and Enterp...

Support for Web and Enterprise Web Applications Java offers an extensive support for the development of web and enterprise applications Servlets, JSP, Applets, RMI, JDBC, EJBs

Program to create shipping company model, This assignment models a simplifi...

This assignment models a simplified delivery company. It is composed of the following departments:  receiving which contains a list of packages to be delivered, shipping which ship

Luminus jewels, Luminous Jewels - The Polishing Game Byteland county is ve...

Luminous Jewels - The Polishing Game Byteland county is very famous for luminous jewels. Luminous jewels are used in making beautiful necklaces. A necklace consists of various lum

Program to built canvas printing calculator, Printing Calculator Canv...

Printing Calculator Canvas Printing Calculator In this assignment we will continue to work on our canvas printing web service. Specifically we will make use of Javascrip

Two dimensional array, create and initialize the two dimensional array call...

create and initialize the two dimensional array called table Numbers of type integer. use nested loops that will add 12 to each element in an array. use nested loops that will get

Write a recursive function, 1) Write a function that uses recursion that co...

1) Write a function that uses recursion that converts a decimal number to octal (base 8). The function should accept a single integer and return a String containing the base 8 equi

What is the actionform, ActionForm is javabean which shows the form inputs ...

ActionForm is javabean which shows the form inputs containing the request parameters from the View referencing the Action bean.

Inheritance, Your task for this assignment is to define multiple classes vi...

Your task for this assignment is to define multiple classes via inheritance. Your classes should implement various "snacks" including "M&Ms", "Popcorn", etc. To begin, create an a

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd