Find Smallest Number in an Array Using Java

| Last Updated: | In: Java Tutorial


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 the below example of finding the smallest number in java array using the Java programming language. Find Smallest Number in …

Prime Number Program in Java

| Last Updated: | In: Java Tutorial


This is a simple Java program to find the prime number. A prime number is a number which is greater than 1 and only divisible by 1 or itself. Following is the first 10 prime numbers:

Prime Number Program in Java In this program, I have taken number as variable to hold the number …

Java Program to Get Yesterday’s Date with Output

| Last Updated: | In: Java Tutorial


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, I have used pre-define classes: 1) java.util.Calendar 2) java.text.DateFormat and 3) java.text.SimpleDateFormat At the end of this tutorial, I shared …

Java Program to Print Random Numbers With Output

| Last Updated: | In: Java Tutorial


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 more understanding. Java Program to Print Random Numbers With Output Copy the below Java programs and execute it with the …

How to Remove Duplicate Element in an Array Using Java

| Last Updated: | In: Java Tutorial


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 program and execute it with the help of Java compiler to see the output. At the end of this tutorial, …

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

| Last Updated: | In: Java Tutorial


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 Number in an Array Using Java Program Copy the below java program and execute it with the help of Java …

Palindrome Program in Java

| Last Updated: | In: Java Tutorial


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 Follow the below steps to check the palindrome number. Step 1) Holds the entered number in a temporary variable. Step …

Reverse Number Program in Java Programming Language

| Last Updated: | In: Java Tutorial


In this program I will share to how to write a Java program to reverse any given number. When you execute this program, it asks you to enter any number and then it will reversed that number and print as output. Reverse Number Program in Java Programming Language Copy the below program and execute it …

Java Program to Subtract Any Two Numbers

| Last Updated: | In: Java Tutorial


In this post, I will explain about a Java program to subtract any two numbers with an example and program output. 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 …