4th SEM B.
Tech(Computer Science and Engineering)
Java Programming Lab(4CS4-24)
Read Instructions before writing programs in file.
1. File should be in printed format.
2. One page – One Program. Write output for every program.
3. Front page should be in proper format.
4. You have to write Java fundamentals in first 2-3 pages. Like:
1. Inheritance
2. Encapsulation
3. Polymorphism
4. Abstraction
5. Data types
6. Java Threads
7. Exception Handling
After writing these theory concepts about Java, start Programs.
PROGRAMS LIST
1. Program to print hello on screen.
2. Program for addition of two numbers.
3. Program to find out maximum out of three using if else.
4. Program to check the grade according to percentage using switch.
5. To print prime number series up to 100.
6. To check whether the given number is even or odd.
7. Print square of numbers up to 50.
8. To print Fibonacci series.
9. Program to add number given in array of 10 size.
10. Find factorial using recursion.
11. Write a program in Java using This Keyword.
12. Write a program to demonstrate exception handing in java.
13. Write a program in java for garbage collection.
14. Write a program to demonstrate the use of throw and throws keyword in java.
15. Write a program in java try and catch statement.
16. Write a program to show how function overloading is done in java.
17. Write a program to show method overriding.
18. Program to show the use of all types of constructors.
19. Program to show multi level inheritance.
20. Write a program in java to demonstrate the use of multiple inheritance.
21. Write a program in java for threads.
22. Write a program in java to show implementation of packages and interfaces.
23. Write a program to show implementation of Applets in java.
24. Write a program to show the use of Final keyword in java.