Java Program to Add Two Numbers Without Using Third Variable

Prem Tiwari - - Java Programming


In this tutorial, I will explain how to write a Java program to add two numbers without using the third variable. In this program, I have declared two variables as X and Y with some …

Java Program to Print First 10 Prime Numbers

Prem Tiwari - - Java Programming


This is a very simple Java program to print first 10 prime numbers. If you are a Java beginners or want to start learning Java programming language, then this program will help you to understand …

Java Program to Subtract Any Two Numbers

Prem Tiwari - - Java Programming


This is a very basic program in Java programming language. If you are a Java beginners or want to start learning Java programming language, then this program will help you to understand the basic Java …

Binary Search Program in Java

Prem Tiwari - - Java Programming


Hi friends, hope you are doing good! In this tutorial, I am going to share a Java program to find the number using binary search program in Java programming language. Binary Search program in Java …

Java Program to Print First 10 Natural Numbers

Prem Tiwari - - Java Programming


A natural number is a number which is commonly used for counting and ordering. As such, it is a whole, non-negative number. If you want to print the first natural number using Java program, then …

Find Smallest Number in an Array Using Java

Prem Tiwari - - Java Programming


In this java program, I will share Java program to find the smallest number in an Array with an example. We have sorted the given array in ascending order and returning the first element. See …

Prime Number Program in Java

Prem Tiwari - - Java Programming


Prime Number Program in Java |┬áprime number program in java using for loop Prime Number Program in Java: This is a simple Java program to find the prime number. A prime number is a number …

Java Program to Get Yesterday’s Date with Output

Prem Tiwari - - Java Programming


In this tutorial, I will share a Java program to get yesterday’s date with an output. Copy the below and execute it with the help of Java compiler and see the output. In this program, …

Fibonacci Series Program in Java

Prem Tiwari - - Java Programming


In this tutorial, I will share Fibonacci series program in Java with example and output. Fibonacci series is the sequence of number which produce by adding up the two numbers before it. Below is the …

Java Program to Print Random Numbers With Output

Prem Tiwari - - Java Programming


This is a simple Java programs which will generate and print the random numbers with the help of inbuilt Java classes java.util.Random. At the end of this program, I have shared some execution result for …

How to Remove Duplicate Element in an Array Using Java

Prem Tiwari - - Java Programming


In this program, I will share how to remove duplicate element in an array using java programming language with an example/output. How to Remove Duplicate Element in an Array Using Java Copy the below java …

How to Find Third Highest Number in an Array Using Java Program

Prem Tiwari - - Java Programming


This is a simple java program to find the third highest/largest number in given Array. Let’s see the below example to find out the third largest number in an array. How to Find Third Highest …

Palindrome Program in Java

Prem Tiwari - - Java Programming


In this tutorial, I will explain how to write a palindrome program in java programming language. A palindrome number is a number which remains the same number when its digits are reversed. Palindrome number algorithm …

Java Program to Calculate The Factorial Number

Prem Tiwari - - Java Programming


Hi friend, hope you are doing good. In today’s tutorial, I am going to share a very useful java program to calculate the factorial number of any given number. If you are looking for how …

How to write a Java Program to Swap Number Without Temporary Variable

Prem Tiwari - - Java Programming


In one of the previous tutorial, I have explained how to swap two numbers in java programming language. In this tutorial, I will share how to write a java program to swap number without a …