Java Programs Class 8 Practical Programs
Java Programs Class 8 Practical Programs
JAVA PROGRAMS
PRACTICAL ASSIGNMENT CLASS – 8 SESSION 2019 – 20
1. Write a Java program to print the sum of two numbers.
2. Write a Java program to print 'Hello' on screen and then print your name on a separate line.
3. Write a Java program to divide two numbers and print on the screen.
4 Write a Java program that takes two numbers as input and display the product of two numbers.
5 Write a Java program to print the sum (addition), multiply, subtract, divide and remainder of two numbers.
6 Write a Java program to print the area and perimeter of a circle.
7 Write a Java program that takes three numbers as input to calculate and print the average of the numbers.
8 Write a Java program to print the area and perimeter of a rectangle.
9 Write a Java program to swap two variables.
10 Write a Java program and compute the sum of the digits of a two-digit integer.
11 Write a Java program to accept a number and check the number is even or odd.
12 Write a Java program to convert seconds to hour, minute and seconds.
13 Write a java program to print the largest of three numbers given by user.
14 Write a java program to accept age of a person and print whether a person is eligible to vote or not.
15. Write a java program to check whether a person has earned profit or loss or no profit no loss. If Selling price
and cost price of a product is given by the user.
JAVA PROGRAMS
PRACTICAL ASSIGNMENT CLASS – 8 SESSION 2019 – 20
1. Write a Java program to print the sum of two numbers.
2. Write a Java program to print 'Hello' on screen and then print your name on a separate line.
3. Write a Java program to divide two numbers and print on the screen.
4 Write a Java program that takes two numbers as input and display the product of two numbers.
5 Write a Java program to print the sum (addition), multiply, subtract, divide and remainder of two numbers.
6 Write a Java program to print the area and perimeter of a circle.
7 Write a Java program that takes three numbers as input to calculate and print the average of the numbers.
8 Write a Java program to print the area and perimeter of a rectangle.
9 Write a Java program to swap two variables.
10 Write a Java program and compute the sum of the digits of a two-digit integer.
11 Write a Java program to accept a number and check the number is even or odd.
12 Write a Java program to convert seconds to hour, minute and seconds.
13 Write a java program to print the largest of three numbers given by user.
14 Write a java program to accept age of a person and print whether a person is eligible to vote or not.
15. Write a java program to check whether a person has earned profit or loss or no profit no loss. If Selling price
and cost price of a product is given by the user.