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 FahrenheitAccording to this scale, water freezes at 32 degrees of Fahrenheit and boils at 212 degrees of FahrenheitSo it will … [Read more...] about Temperature Conversions using Java
Archives for May 2020
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 not do this, next time when nextInt is called it may not found the … [Read more...] about Average of n Numbers in Java
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 as it allows the user to pass InputStream as an … [Read more...] about Addition of Two Numbers in Java
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 … [Read more...] about Finding Maximum of Three Numbers in Java