Java Program to Check a Number is Palindrome or Not

In this post we will explore the basic java program to check a number is palindrome or not and explaining the concept of palindromic numbers and how the program works. Palindrome: A palindrome number is a number that remains the same when its digits are reversed. For example, 121 ,12321 are palindrome numbers, but 1234 … Read more

Find the Greatest of the Two Numbers in Java

Here, we will learn the basic java program to find the greatest of the two numbers. Problem : simple example of problem :  Input : Enter the first number: 8 Enter the second number: 15  Output : The greater number is: 15 Explanation: In this example, the program compares the two numbers (8 and 15) … Read more

Java Program to Get Input from User

In this post we will learn how to get input from user in java. Java User Input: The Scanner class is used to get user input, and it is found in java.util package. we use the scanner class, to create an object of the scanner class and use any of the available methods found in the … Read more

Prime Number Program in Java

Here, first we understand that what is prime number, Prime Numbers A prime number is a natural number greater than 1, that is divisible by only two numbers: 1 and itself. For Example: 2, 3, 5, 7,11,13……..are the prime numbers. Note: 0 and 1 are not prime numbers. The 2 is the only even prime … Read more

Addition of two numbers in java

In this post we will go through the process of adding two numbers in Java. Problem : here is the simple example – Input : Enter the first number: 10 Enter the second number: 5 Output : The sum of the two numbers is: 15. Explanation : In this example, the user entered 10 as the … Read more

How do I Reverse An Int Array In Java?

Now in this post, we will learn How do I Reverse An Int Array In Java? As we can do so using two ways one by using the inbuild reverse() function and the other by simple for loop as getting the array elements and storing them in another array in a reverse way using indexes. … Read more

%d bloggers like this: