Write a Java program to input days from user and find total years, weeks and days. How to convert days to years weeks and days in Java programming.
Write a Java program to input temperature in Fahrenheit from user and convert to Celsius. How to convert Fahrenheit to Celsius in Java programming.
In the previous post, I explained to convert temperature from Celsius to Fahrenheit. In this post, we learn how to convert Fahrenheit to Celsius in Java.
Write a Java program to input Celsius from user and convert temperature from Celsius to Fahrenheit. How to convert Celsius to Fahrenheit in Java.
In this on going Java programming examples, we will continue to enhance basic Java programming skills. In this post we will learn to convert given temperature from Celsius to Fahrenheit in Java.
Unions in C are user defined data type similar to structures. Union allows to define multiple members of different type at single location. In this article I will explain what is union, need of union, how to declare, define and access unions in C programming language.
We use unions to define a new data type, similar to structures in C. Its definition, use and access are almost similar to structures. If I say its similar to structure, then you may think why in the world do we need it then. Hence, let us first explore the real world need of a union type.
Write a Java program to input length and width and find perimeter and area of rectangle. Logic to find perimeter and area of a rectangle, whose length and width are given. In this example we will learn to write basic logical program in Java. We will learn to find perimeter and area of rectangle.
Length of rectangle = 30 Width of rectangle = 20
Perimeter of rectangle is 100.0 units. Area of rectangle is 600.0 sq. units.
Write a Java program to perform all arithmetic operation. How to perform arithmetic operations in Java programming. In this example we will learn to input two integer from user and perform all arithmetic operations.
First number: 15 Second number: 4
Sum : 19 Difference : 11 Product : 60 Quotient : 3 Modulus : 3
Write a Java program to input two numbers add two numbers. In this example we will learn to use arithmetic operator to find sum of two numbers. We will learn to input two number from user and find sum of two numbers in Java.
First number: 10 Second number: 5
Sum of 10 and 5 is : 15
Write a java program to perform basic input using Scanner class. In this article I will explain how to input all basic data types using Scanner class in Java. We will learn how to use
java.util.Scanner class to input data from user.
Enter charater value: c Enter integer value: 10
You entered charater : c You entered integer: 10