Temperature Conversions using Java

In this article, we’ll see the temperature conversions between four different temperature scales named Fahrenheit, Celsius, Kelvin, and Rankine. Temperature Scales Fahrenheit Scale Fahrenheit scale was created by German scientist Daniel Gabriel Fahrenheit According to this scale, water freezes at 32 degrees of Fahrenheit and boils at 212 degrees of Fahrenheit So it will take … Read more

Average of n Numbers in Java

In this post, we’ll see various ways of calculating average of n numbers in Java.1) Average of 3 input numbers2) Average of n numbers input by user3) Average of the numbers in an array Average of 3 input numbers: We are calling nextLine to read the newline character entered after the number. If we do … Read more

Addition of Two Numbers in Java

We will solve this basic problem of the addition of two numbers in three ways, first by using a Scanner, second by using BufferedReader, and at last by using command-line arguments. Addition of two numbers using Scanner Java provides Scanner class in java.util package. This class is very popular to read values from the user … Read more

Finding Maximum of Three Numbers in Java

In this post, we will see 2 variations of finding maximum of 3 numbers in Java: (A) Max value of 3, (B) Max variable of 3 numbers. Max Value of 3 Max Variable of 3