Basic

Java Program to Calculate Simple Interest

Here you will get java program to calculate simple interest. We can calculate simple interest in java by using following formula. Simple Interest = (Principle x Rate x Time) / 100 Also Read: Java Program to Calculate Compound Interest import java.util.Scanner; public class JavaSimpleInterest { public static void main(String args[]){ float p, r, t, si; Scanner …

Java Program to Calculate Simple Interest Read More »

Java Program to Calculate Area and Circumference of Circle

Here you will get java program to calculate area and circumference of circle. Formula used: Area of Circle = 3.14 * radius2 Circumference of Circle = 2 * 3.14 * radius import java.util.Scanner; public class Circle { public static void main(String args[]){ double radius, area, circumference; Scanner sc = new Scanner(System.in); System.out.println(“Enter radius:”); radius = …

Java Program to Calculate Area and Circumference of Circle Read More »

Java Program to Find Largest of Three Numbers

Here you will get java program to find largest of three numbers using if else statements. import java.util.Scanner; public class LargestNumber { public static void main(String…s){ int x, y, z, largest; Scanner sc = new Scanner(System.in); System.out.println(“Enter three numbers:”); x = sc.nextInt(); y = sc.nextInt(); z = sc.nextInt(); largest = x; if(y > x && …

Java Program to Find Largest of Three Numbers Read More »