Posts from Java

Difference between super() and this() in Java

By Ritvik Pant

Here, We are going to talk about super() and this() in Java and the basic differences between them. super() in Java This keyword helps a subclass refer to its immediate superclass..... Read More

Difference between print() and println() in Java

By Ritvik Pant

Here, We have discussed print and println() methods in Java and the differences between them:- Difference between print() and println() in Java print():- print() is a method in Jav.... Read More

Initialize a HashMap in Java

By Deepak Reddy

In this module, we are going to discuss how to initialize a HashMap in Java Programming. HashMap is a Java Collections framework that provides HashTable for implementing the Map in.... Read More

How to swap objects in Java

By Priya Bansal

In this tutorial, we’ll learn how to swap objects in Java. Swap refers to the exchange of previously assigned values. It has different approaches, such as: using a temporary .... Read More

Types of References in Java

By Mainak Halder

Hello, learners Today I’m going to discuss the types of references present in Java. Java has mainly four types of references. 1.Strong references 2.Weak references 3.Soft ref.... Read More

Console readPassword() in Java with examples

By Siddharth Raja

In this tutorial, we will see the use of readPassword() method in Java along with examples. The readPassword() method belongs to the Console class in Java. It allows the user to ty.... Read More

Java program to find Nth pure number

By Abhishek Kaushik

Hello Friends, In this tutorial, we will look at what is Nth pure number then we will try to write code for Nth pure number in Java. Finding Nth pure number in Java First of all, w.... Read More

How to convert a HashMap to TreeMap in Java

By Shivam Purohit

Hello programmers, in this tutorial you will learn how to convert a HashMap to TreeMap in Java. In this tutorial, you will be mainly using the putAll() method for converting and st.... Read More