Escape Sequence in Java

Escape sequence is a character which is preceded by the backslash (\). Compiler has special meaning for escape sequences. Use of Escape Sequences Sometimes we may need to print some text within double quotes or we may need insert a new line in between texts. So these escape sequences were introduced to perform these special … Read more

HashMap in Java

HashMap is one of the most used collections in Java. It is used to store key value pair. The size of HashMap increases as more key value pairs are added. Let us look at sample declaration of HashMap: HashMap<Integer,String> dummy = new HashMap<Integer,String>(); In above sample the key stored will be of type Integer and … Read more