Map Java Collection Tutorial

Map Stores values in key and value. map does not allow duplicate key. only one null key but any number of null values To synchronize the Map use. Collections.synchronizedMap(yourMapObject) Hashmap Hashmap allows random storage sequence is not maintained. Stores values in key and value. Hashmap is not synchronized. Collections.synchronizedHashset Hashmap does not allow duplicate key. Hashmap allows only one null…

Read More Read More

Singly Linked List using java.

Singly Linked list using java Singly Linked List is created for adding the elements one after another where each Node is linked to the other Node sequentially. The operations covered in this post are      Append to the end      Add in the middle of linked list. Append to the end How we are going to create linked…

Read More Read More

Jdbc tutorial for beginners

Database is required for saving the record so that I can use saved data further.This is simple jdbc program to teach you jdbc in very simple easy step by step approach. In this tutorial you will learn how to use jdbc to save or get the records. 1.First step is to Load the driver. Class.forName(“oracle.jdbc.driver.OracleDriver”); How to load the driver and…

Read More Read More

polymorphism example

polymorphism in java

Runtime polymorphism

Runtime polymorphism In this tutorial we will discuss overloading and overriding examples.We are going to learn the tricky part of the polymorphism. Overriding example: Which method to call will be determined by the instance of the class.

Here method defined in the superClass will be called.

Method Overloading:Which method to call will be determined by the reference type.…

Read More Read More

Constructor chaining example

constructor demo

constructor properties

Encapsulation real example in java

encapsulation example java