Core Java (Advanced Topics)


Java Exceptions Handling:
In Exception mechanism to handle errors ,other exceptional conditions and how to throw and catch exception.
More Click -->

Java Collections Framework :
The Java collections framework (JCF) is a set of classes and interfaces that implement commonly reusable collection data structure.
Java provided ad hoc classes such as Dictionary,Vector,Stack and Properties to store and manipulate group of object.

The Collection interface(Java.util.Collection) and Map (java.util.Map) are two main root interface of java collection classes

Advantages of Collection Framework:

  1. Consistent API :  The API has basic set of interfaces like Collection Set,List or Map.All those classes (Such as ArrayList, LinkedList,vector etc) which implements,these interface have some conman set of methods.
  2. Reduces Programming effort : The programmer need not to worry about design of collection rather then he can focus on it's best  use in the program.
  3. Increases program speed and quality:  Increase performance by providing high-performance implementations of  useful data and algorithms.

Short Note On Collection :

Set : Doesn't allow duplicates. Example implementations of Set interface are HashSet (Hashing based) and TreeSet (balanced BST based).
Note that TreeSet implements SortedSet.
List : Can contain duplicates and elements are ordered. Example implementations are LinkedList (linked list based) and ArrayList (dynamic array based)
Queue : Typically order elements in FIFO order except exceptions like PriorityQueue.  
Deque : Elements can be inserted and removed at both ends. Allows both LIFO and FIFO. 
Map : Contains Key value pairs. Doesn't allow duplicates. Example implementation are HashMap and TreeMap and TreeMap implements SortedMap.        
More Click -->

Date-Time APIs :
The Date/Time API is moved to java.time package and Joda time format is followed. Another goodie is that most classes are Threadsafe and immutable.
More Click -->

No comments: