Java Programming Exercises…
1. Write a program in Java to display the current date and time.
2. Write a Java program to create a simple calculator for basic arithmetic operations.
3. Write a program in Java to accept and display employee details using BufferedReader.
4. Write a program in Java to accept monthly salary data (January to December) and
calculate the gross salary using a parameterized constructor.
5. Write a program in Java to design a String class that performs string operations such
as equals, reverse, and case conversion (case-sensitive comparison).
6. Write a program in Java to design a class Account using inheritance and static
members that performs all functions of a bank such as deposit and withdrawal, and
generates account numbers dynamically using the Scanner class.
7. Write a program in Java for partial implementation of an interface.
8. Write a program in Java to create a package that accesses the members of both an
external class and a class within the same package.
9. Write a Java program to handle a user-defined exception using the throw keyword
and the Scanner class for input validation.
10. Write a Java program to illustrate thread priorities in multithreading.
11. Write a Java program to demonstrate the use of thread methods: getName(),
setName(), getPriority(), setPriority(), isAlive(), and yield().
12. Write a program in Java Applet to draw shapes and graphics.
13. Write a program in Java AWT to handle mouse events using MouseListener.
14. Write a program in Java to create a menu using a Frame (AWT-based GUI).
15. Create a Java program to implement Stack and Queue concepts using java.util.Stack
class.