Searched for ""

Java Collection Iterators

With this article we will kick-off a new series where we will look deep into Java’s different collection solutions which are available in the version 1.8. For concrete implementations (like ArrayList or TreeSet) we will give you some use-cases where these collections will excel and some cases where you should use different collections. And of… Continue reading

Java Hashmap tutorial

Java HashMap is a HashTable based implementation of Map. This is the reason why the interviewer always asks for the difference between HashMap and HashTable. HashMap is mostly equated to HashTable except below two differences. HashMap is unsynchronized while HashTable is synchronized. HashMap permits null while HashTable doesn’t. Important Property of HashMap DEFAULT_INITIAL_CAPACITY  Default Initial… Continue reading

this keyword in Java

What is this this is a keyword in Java. It can be used inside the method or constructor of a class. It(this) works as a reference to the current object, whose method or constructor is being invoked. This keyword can refer to any member of the current object from within an instance method or a constructor.

Order of execution

In this article, we will learn about the order of execution of blocks in Java. Different blocks and their order of execution in Java Class Static Block Init Block(Anonymous Block) Constructor /* * Here we will learn to see how the different part (Ananymous Block, Constructor and Static Block ) of class will behave * and… Continue reading