In Switch Case Why Do We Need Break After Case Statements?

In this Tutorial, we will learn In Switch cases Why Do We Need to Break After Case Statements? As we know the switch is used as a conditional statement where it checks the variable for equivalence if the variable we entered matches the value we predicted it started executing all the leading statements after that. … Read more

When To Use LinkedList Over ArrayList In Java?

In this tutorial, we will discuss When To Use LinkedList Over ArrayList In Java? As we know manipulation of elements that is adding and deleting takes constant time in LinkedList so when such operations are frequent then we use LinkedList otherwise we simply use an arraylist for searching as it takes constant for searching. LinkedList … Read more

What Are The Differences Between A HashMap And A Hashtable In Java?

In this article, we will learn What Are The Differences Between A HashMap And A Hashtable In Java? As hashmap is non-Synchronised whereas hashtable is synchronized. And hashmap is allow a null Value whereas hashtable does not allow any null values, there are a number of such differences that we will difference here. HashMap There … Read more

How pass-by-reference Is Different From pass-by-value In Java?

In This Tutorial, we will discuss How pass-by-reference is Different From pass-by-value In Java? As both of them are ways to pass the argument in a method in java where the pass-by-value references the exact value of the variable whereas in the case of pass-by-reference means the variable passed in the argument has referred to … Read more

How To Print Odd And Even Numbers Using Different Classes In Java Program?

Here we will discuss How To Print Odd And Even Numbers Using Different Classes In Java Programs where we can use one class to find all odd the elements in one class and the rest of all will be even so print the rest of all at different places which will be called as even. … Read more

Why Do We Use Nested Classes In Java?

Here we will discuss Why We Use Nested Classes In Java? where the nested class is used for increasing the encapsulation and increase the readability of code or program. And as we know that to declare the class as static we need to have the class as a nested class.   Nested Class Nested classes … Read more

How To Test Multiple Variables For Equality Against A Single Value?

Here we will learn how To Test Multiple Variables For Equality Against A Single Value. as we can follow multiple ways to do so like conditional operators like if- else or switch case can be used for the same if the thing is to simply check for equality. Checking Of Multiple Variables With A Variable … Read more

How To Delete Minimum And Maximum From Array?

In this tutorial, we will learn How To Delete the Minimum And Maximum From an Array? for which we have to first find out the maximum and minimum values of an array using max and min functions of library math and then just erase them as per over requirement. Let’s look at the example and … Read more

What is Upcasting and Down casting In Java?

In this tutorial, we will learn What is Upcasting and Downcasting In Java? Upcasting which is also known as a generalization or widening is casting in the parent type or from an individual type to a common type whereas down casting means specialization or we can say narrowing means casting to a child type. Or … Read more

How Recursion Is Different From Loop?

Here we will learn How Recursion Is Different From Loops? where both are used for executing a set of code multiple times until the condition is true, where recursion is calling a function multiple times until the state is actual, whereas the loop has a set of code that need to execute for a condition. … Read more

%d bloggers like this: