0% found this document useful (0 votes)
7 views1 page

Java Lab Programs

The document provides a list of 20 Java programming tasks, ranging from basic to advanced concepts. Tasks include displaying 'Hello, World!', checking even or odd numbers, finding factorials, and implementing data abstraction, encapsulation, and inheritance. Additionally, it covers exception handling, GUI applications, and multithreading.

Uploaded by

ansh65121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views1 page

Java Lab Programs

The document provides a list of 20 Java programming tasks, ranging from basic to advanced concepts. Tasks include displaying 'Hello, World!', checking even or odd numbers, finding factorials, and implementing data abstraction, encapsulation, and inheritance. Additionally, it covers exception handling, GUI applications, and multithreading.

Uploaded by

ansh65121
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Write a Java program to display "Hello, World!" on the screen.

2. Write a Java program to check whether a given number is even or odd.

3. Write a Java program to find the factorial of a number using recursion.

4. Write a Java program to print the Fibonacci series up to N terms.

5. Write a Java program to demonstrate data abstraction.

6. Write a Java program to check if a given string is a palindrome.

7. Write a Java program to demonstrate data encapsulation.

8. Write a Java program to demonstrate constructor and deconstructor its type I.e. default, parameterize.

9. Write a Java program to implement a simple calculator using switch case.

10. Write a Java program to count the number of vowels, consonants, digits, and white spaces in a string.

11. Write a Java program to find the largest and smallest elements in an array.

12. Write a Java program to demonstrate single and multilevel inheritance.

13. Write a Java program to demonstrate method overloading and method overriding.

14. Write a Java program to implement an interface and demonstrate polymorphism.

15. Write a Java program to create an abstract class and implement it in a subclass.

16. Write a Java program to handle exceptions using try-catch blocks.

17. Write a Java program to create a custom exception and handle it.

18. Write a Java program using this and super keywords.

19. Write a Java program to create a simple GUI application using Swing (e.g., a basic calculator or login form).

20. Write a Java program to implement multithreading using the Thread class and Runnable interface.

You might also like