Java | Why Can’t I Use Switch Statement On A String?

Here we will find out Why can’t I use a switch statement on a String? in Java Switch can take only Integers, Short, and characters as input because the size it can accommodate is -128 to 127 where all the characters come and in this range, we can see those integers also come but the … Read more

Array | Difference Between int[] array and int array[].

In this tutorial, we will learn the Difference Between int[] array and an int array[]. As far as single dimension array is concerned both are the same we can declare in any of the ways but we can not do so for multidimensional arrays. Whereas int array[] is a way to initialize an array in … Read more

Syntax For Creating A Two-Dimensional Array In Java

Here we will discuss Syntax For Creating A Two-Dimensional Array In Java where we need to provide two square brackets before the array variable name and just after the data type in java where it was somewhat different in the case of C and C++. So let’s see how to initialize a two -dimensional array … Read more

In Stack What Are The Conditions Of Underflow And Overflow?

Here we will learn about In Stack and What Are The Conditions Of Underflow And Overflow? As Overflow is a condition when we try to add a new element in a stack but there is not enough s[space means the stack is already filled and in a can of underflow when we try to delete … Read more

How to do method overloading for null argument?

In this Tutorial, we will learn How to do method overloading for null arguments? as we can by specifying the variable type which has stored the null value to understand follow the example given below. Although we can not pass the argument as null making a variable, store the null value in it. Method Overloading … Read more

Explain Java Default Constructor

In This Tutorial, we will learn Java Default Constructor where the default constructor is a constructor which has just the name same as the name of the class without any argument and which is called on its own just by creating an object implicitly. Java Constructor constructors are function that has the same name as … Read more

What is Recursion in Java explain with example?

Here we will Learn What is Recursion in Java and explain it with examples? recursion is calling a function time and again and making it a loop with a given condition and updations and executing a set of code multiple times in a loop to get desired output. Function Calling A function call is a … Read more

In Java How To Find Finding Duplicates In Array?

In this tutorial, we will Learn In Java How To Find Finding Duplicates In an Array? We can do so using comparing each element of the array with each element of the array except the original elements. Using nested for loop with the help of if else conditional operations. Array In Java And Its Elements … Read more

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

%d bloggers like this: