## Java Program For Addition, Subtraction, Multiplication, Division

Java program for Addition, Subtraction, Multiplication and Division. Here we will discuss the most common mathematical operations such as addition, subtraction, multiplication and division In java. The compiler has been added as well…

## Prime Number Java Program – 1 to 100 & 1 to N | Programs

Prime Number Java Program –  Java Program to Check Whether a Number is Prime or Not using different methods. The compiler has also been added so that you can execute the programs yourself,…

## Java Program To Calculate Future Investment Value

Java programs to calculate the future investment value – In this particular article, we will brief in on the various ways to calculate the future investment value in Java Programming. Suitable examples and sample…

## Java Program To Calculate Future Investment Value

Java programs to calculate the future investment value – In this particular article, we will brief in on the various ways to calculate the future investment value in Java Programming. Suitable examples and sample…

## java program to sort an array in ascending order

import java.util.Scanner; public class JavaExample { public static void main(String[] args) { int count, temp; //User inputs the array size Scanner scan = new Scanner(System.in); System.out.print(“Enter number of elements you want in the…

## Check leap year in java

class Leapyear { public static void main(String arg[]) {     long a,y,c;                  Scanner sc=new Scanner(System.in);     System.out.print(“enter  any  calendar year :”);                    y=sc.nextLong();          if(y!=0)     { a=(y%400==0)?(c=1):((y%100==0)?(c=0):((y%4==0)?(c=1):(c=0)));       if(a==1)     System.out.println(y+” is a leap year”);                      else…

## Java programs to print prime number upto N

class Prime { public static void main(String arg[]) {                System.out.println(“Enter a number “); Scanner sc=new Scanner(System.in); int n=sc.nextInt(); primeCal(n); }    static void primeCal(int num)    { int count=0; for(int i=1;i<=num;i++) {…

## Perimeter of Rhombus

class PerimeterOfRhombus {    public static void main(String args[])     {                 Scanner s= new Scanner(System.in);                   System.out.println(“Enter the side of the Rhombus:”);                   double a= s.nextDouble();          double  perimeter=4*a;        System.out.println(“perimeter…

## Java program to print area of equilateral triangle

class PerimeterOfEquilateralTriangle {    public static void main(String args[])     {                   Scanner s= new Scanner(System.in);                   System.out.println(“Enter the side of the Triangle:”);          double a= s.nextDouble();          double  perimeter=3*a;                 System.out.println(“perimeter…

## java program to check palindrome string using recursion

Program: Check whether String is palindrome using recursion package beginnersbook.com; import java.util.Scanner; class PalindromeCheck { //My Method to check public static boolean isPal(String s) { // if length is 0 or 1 then…