JAVA Tutorials

TreeSet in Java : Tutorial and Interview Questions

TreeSet class implements the Navigable Set Interface and  It creates a collection that uses a tree for storage. Now lets understand some features of TreeSet below. Features of TreeSet 1) TreeSet implements the Navigable Set Interface. 2) Underlying data structure of TreeSet is balanced tree. 3) Duplicate elements are not allowed. 4) Insertion order is …

TreeSet in Java : Tutorial and Interview Questions Read More »

Inheritance : Composition and aggregation or Has a relationship in OOPS Java

Inheritance :Has a relationship in OOPS Java 1) Has-a- relationship is also known as composition or aggregation 2) No specific keyword is there to implement has a relationship. 3) Its advantage is that it is helpful in code re-usability. Lets understand the Has a relationship with a Java code example : Here we have 4 …

Inheritance : Composition and aggregation or Has a relationship in OOPS Java Read More »

Inheritance in Java or Is a relationship in Java : Tutorial and Interview Question

Inheritance is one of OOPS concept in Java where child class inherits the method of parent class. It emphasize on the res-usability of the code. some facts about Inheritance 1) Inheritance is implements by extends keyword in java. 2) Inheritance make the re-usability of code ie child class can access the methods of parent class …

Inheritance in Java or Is a relationship in Java : Tutorial and Interview Question Read More »

MAP Interface in Java : Complete tutorial and Interview question

Map in java used to represent the represent the group of objects as key-value pair whereas collection concept is to represent the group of objects as a single entity. Example : Suppose we want to store the customer Id and Customer name together then we can use MAP. Below we have described this a java program. Features of MAP …

MAP Interface in Java : Complete tutorial and Interview question Read More »