Intro to HashMap and its Basic Methods like get,put,remove,clear,empty and size.

March 21, 2012

HashMap works on principle of Hashing,we have to put() and get() method for storing and retrieving object from hashMap. The Map interface maps unique keys to value means associating value to unqiue keys.By using key pair value,you can store value inMap object,which can be retrieved later using its key. Since HashMap class uses a hash [...]

Inheritance in JAVA

March 6, 2012

Definition of Inheritance Inheritance is a compile-time mechanism that allows you to extend the class i.e one class can inherit the other class. The class which is being inherited/extended is called the base class or the super class and the class which inherits that base class is called the derived class or the sub class. [...]

Introduction to Final Keyword – Final class and Final Method in Java

March 6, 2012

Final keyword : Sometimes you want instance variables to be modifiable and sometimes not.By using keyword final,we specify that variable is a constant.So we can say if an instance variable is not supposed to be modified,then declare it to be final to prevent modification. If someone attempts to modify the same results in error.Ant attempt to modify [...]

ArrayList in JAVA

March 4, 2012

ArrayList ArrayList is a class in the core JAVA Library(the API) and easy to use class representing one-dimensional array. ArrayList class extends AbstractList and implements List interface.It is not synchronized i.e. if more than one thread is editing the arraylist concurrently than the changes might not be synchronized implicitly. This is accomplished by synchronizing on [...]

Scope of Object in JSP

January 8, 2012

Scope of objects in Java Server Pages The scope of JSP object determines availability of that object to be used at a particular place of the application.Each and every object in JSP page would have a scope.There are four types of scope for a JSP object.They are as follows: 1.Application: A JSP object created using [...]