HashMap in Java

Here is the list of methods available in HashMap class. I have also covered examples using these methods at the end of this post. void clear(): It removes all the key and value pairs from the specified Map. Object clone(): It returns a copy of all the mappings of a map and used for cloning them…

Read More

Different variables in Java.

In this blogpost we will discuss the  different types of variables in Java. But before that lets see the naming conventions which are followed/allowed in Java programming language.  Variables naming cannot contain white spaces, for example: int num ber = 100; (invalid)  Variable name can begin with special characters such as $ and _.  As per the java…

Read More