Java

How to Use Reverse number in java

Reverse means, a complete change of direction or action and place.

What do you mean by loop?

A loop is a sequence of instructions that are executed many times, each time a different set of data.

Use of Vector in Java?

Vector is a dynamic array which can grow automatically according to the required need.

How to use Nested if else in java

Nested if else use for check the multiple condition.

Use of Switch-Case in Java?

The switch case statement is useful when selecting some action from a number of alternatives. The value inside the test expression must be a int, char, short or byte. It can not be a long, double, float, string or any other other kind of object.The switch statement allows for any number of possible execution path.
The body of a switch statement is known as a switch block.

How To Use Single Inheritance in Java

Now, we will first write a program using a “has a relationship ” in Single Inheritance. Step 1 Let’s open Notepad and enter the following code. Code class Test { void show() { System.out.println(“welcome in java method”); } } class… Continue Reading →

Swap two numbers without using third variable in java

In this article we learn how to swap two numbers without using third variable in java. Step 1: Lets open the notepad and write the following code: Lets try to find the error in this program. if we write the… Continue Reading →

How to use Array in java?

Array is a collection of similar type of elements. However big an array, its element are always stored in contiguous memory location. This is very important point which we would discuss in more detail later on. To begin with, like other… Continue Reading →

How to find Even and Odd Number?

This java program we find that a number is even or odd. If the number is divisible by ‘2’ then it will be ‘Even’, otherwise it is ‘Odd’. Step 1: Lets open a notepad and write the following code. //Code… Continue Reading →

swap two number without using any third variable and arithmetic operator.

swap two number without using any third variable and arithmetic operator.