Java Program to check number is positive or negative
In this tutorial you will be learning Writing Java Program to check a Given input number is a positive number or a negative number. For Example 1 : Suppose given…
In this tutorial you will be learning Writing Java Program to check a Given input number is a positive number or a negative number. For Example 1 : Suppose given…
In this tutorial you will be learning Writing Java Program to check a Given input is either a Digit or an Alphabet or a Symbol. For Example: Example 1: Suppose…
In this tutorial you will be learning Writing Java Program to check a Given input is Alphabet or not. For Example: Example 1: Suppose a given input is 10 Then…
In this tutorial you will be learning Writing Java Program to check a Given input is Digit or not. For Example: Example 1: Suppose a given input is 10 Then…
In this tutorial, we will be learning to write a leap-year program in Java. A leap year is a year that has 29 days in February and 366 days in…
In this tutorial, you will be learning to write Java Program to check given number is Even number or odd number. Even a number is a number that is divisible…
In this tutorial, you are going to learn to write a java program to check whether a given number is divisible by 11 or not. For example: Take a number…
In this tutorial, you are going to learn writing java program to check whether a given number is divisible by 5 or not. For example: Take a number as input…
In this tutorial, you are going to learn to write a java program to check whether a given number is divisible by 3 or not. For example: Take a number…
An anagram is a word or phrase formed by rearranging the letters of a different word or phrase. For example: Two strings str 1 = arc and str2 = car…
In this tutorial we will learn writing Java Program to print maximum number among three given number. For example: suppose we have given three numbers num1 = 23, num2 =…
In this tutorial, you will learn how to write Java Program to print the maximum or largest number among two numbers. There are various approach to solve and write the…
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the size of array: "); int n = sc.nextInt(); int arr[] =…
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the size of array: "); int n = sc.nextInt(); int arr[] =…
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Enter the size of array: "); int n = sc.nextInt(); int arr[] =…
import java.util.*; public class Main{ public static void main (String[]args){ Scanner sc = new Scanner (System.in); //Taking array size and array element as input System.out.println ("Enter the size of array:…
In this tutorial we have explained how to write java program to perform left rotation on array element by two position. Here left rotation by two means shifting the array…
In this tutorial you will be learning java program to perform right rotation on array element by one. For example: Suppose we have given an array arr = [2, 3,…
In this tutorial you will be learning writing java program to perform left rotation on the array element by one place. For example: Suppose we have an array arr =…
In this tutorial you will be learning writing java program to sort the given array in descending order. For example: Suppose we have an array arr = [2, 1, 4,…