• 26 February

    Externalizable in java

    This is 3rd part of java Serialization tutorial Java Serialization Tutorial: Serialization in java Java Serialization interview questions and answers serialversionuid in java serializationexternalizable in java Transient keyword in java Difference between Serializable and Externalizable in Java Before understanding Externalizable interface, you need to have idea about Serialization.You can read more about Serialization at Serialization […]

  • 25 February

    hash and indexFor method in HashMap

    Java HashMap: HashMap in java How HashMap works in java hash and indexfor method in HashMap hashcode and equals method in java How to sort HashMap by keys and values Difference between HashMap and HashSet Difference between HashMap and Hashtable How to iterate over HashMap Target AudienceThis post is for the people who already have […]

  • 24 February

    hashcode() and equals() method in java

    In this post ,we will try to understand hashcode() and equals() method in java. Java HashMap: HashMap in java How HashMap works in java hash and indexfor method in HashMap hashcode and equals method in java How to sort HashMap by keys and values Difference between HashMap and HashSet Difference between HashMap and Hashtable How […]

  • 08 December

    Static keyword in java with examples

    In this post, we will see about static keyword in java.So static keyword can be associated with: Variable Method Block Nested class Lets go through each one by one. Static variable: If any instance variable is declared as static.It is known as static variable. [crayon-67448fa0e6ad2557240843/] Some points about static variables are: Static variable belongs to […]

  • 11 March

    serialVersionUID in java Serialization

    This is 2nd part of java Serialization tutorial Java Serialization Tutorial: Serialization in java Java Serialization interview questions and answers serialversionuid in java serialization externalizable in java Transient keyword in java Difference between Serializable and Externalizable in Java serialVersionUID is used to ensure that same class(That was used during Serialization) is loaded during Deserialization.serialVersionUID is […]

  • 09 March

    Serialization in java

    This is 1st part of java Serialization tutorial. Java Serialization Tutorial: Serialization in java Java Serialization interview questions and answers serialversionuid in java serializationexternalizable in java Transient keyword in java Difference between Serializable and Externalizable in Java Java provides mechanism called serialization to persists java objects in a form of ordered or sequence of bytes […]

  • 01 March

    Template method design pattern in java

    CodeProjectTemplate method pattern is a behavioral design pattern which provide base method for algorithm,called template method which defers some of its steps to subclasses So algorithm structure is same but some of its steps can be redefined by subclasses according to context. Template means Preset format like HTML templates which has fixed preset format.Similarly in […]

  • 27 February

    Observer design pattern in java

    As the name suggests it is used for observing some objects.Observer watch for any change in state or property of subject.Suppose you are interested in particular object and want to get notified when its state changes then you observe that object and when any state or property change happens to that object,it get notified to […]

  • 26 February

    Difference between Comparator and Comparable in java

    CodeProject One of the common interview question is “What are differences between Comparator and Comparable”. or “How will you sort collection of employee objects by its id or name”.For that we can use two interfaces.i.e. Comparator and Comparable.Before we actually see differences,let me give you brief introduction of both. Comparable interface: Class whose objects to […]