1.
Write a program in Java to instruct the computer to
display a welcome message in Java output window.
Program:
Output:
2. Write a program in Java to calculate percentage of
two students.
Program:
Output:
3. Write a program in Java to cheque eligibility of a
person to vote on the basis of universal adult
franchise.
Program:
Output:
4. Write a program in Java to display name of the day
of the week according to the given number.
Program:
Output:
5. Write a program in Java to print the squares of
numbers from 1 to 10.
Program:
Output:
6. Write a program in Java with the method that given
the length and breadth of the rectangle as parameters
return the area of rectangle.
Program:
Output:
7. Write a program in Java that uses void as return
type.
Program:
Output:
8. Write a program in Java to create a class with data
members and method members.
Program:
9. Write a program in Java to create a constructor of a
class.
Program:
10. Write a program in Java to create an object of a
class using new keyword and access its data member
and method members.
Program:
Output:
11. Write a Java program to Generate Multiplication
Table (number of iteration (from 1 to 10)) using for
loop of a number by getting the input of a number of
user choice during runtime.
Program:
Output:
12. Write a program in Java to handle division by zero
exception.
Program:
Output:
13. Write a JAVA program to print the sum of first 10
natural numbers 1 to 10..
Program:
Output:
14. Write a Java program to print the FACTORIAL of
a given number by getting the input of a number of
user choice during run time.
Program:
Output:
15. Write a program in Java to create two threads
by implementing the runnable interface.
Program:
Output: