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 …

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, …

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 …

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

| Last Updated: | In: Java Tutorial


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 temporary variable. How to write a Java Program to Swap Number Without Temporary Variable Copy the below java program and …

Odd Even Program in Java

| Last Updated: | In: Java Tutorial


I got a request from my site readers who is a student of the final year in BCA and is a java beginner about how to write a program in java programming language to check whether the number is Odd or Even. Odd Even Program in Java Programming Language. This is a simple java program …

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 Check Armstrong Number

| Last Updated: | In: Java Tutorial


This is simple Java program to check Armstrong number. When you execute this program, it asks to enter any number and then it will check whether entered number is Armstrong number or not. At the end of this tutorial, I have shared the execution output for two numbers one for Armstrong and another for the …

Java Program to Swap Numbers

| Last Updated: | In: Java Tutorial


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 programming. In this post, I will explain about a Java program to swap two numbers with an example. Java Program …

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 …