Java 4th and 5th Module Assignment Questions
1. Explain the concept of importing packages in Java and provide an example
demonstrating the usage of the import statement.
2. Write a Java program to demonstrate the working procedure of Packages and Member
Access with classes from different packages.
3. Bring out the differences between
i) Multithreading and multitasking.
ii) Process and thread
4. Elucidate the concept of Multiple Catch Clauses in Exception handling and
demonstrate the same with simple Java program
5. Write a Java program to demonstrate Nested try Statement in exception handling
mechanism with all 3 cases explanation.
6. Elucidate the concept of throw and throws in Exception handling and
demonstrate the same with simple Java program.
7. What are the uses of try and catch blocks in exception handling? Explain with a
sample program along with displaying description of the exception.
8. Write the neat diagram explains the life cycle of thread and explain the thread
priorities in java.
9. What is the important role of the main thread in java? Demonstrate the same with
a sample program.
10. Explain isAlive() and join() methods of Thread with example code snippet.
11. Explain with an example how inter-thread communication is implemented in
Java.
12. Write a Java program to demonstrate with creation of three child threads in
multithreading programming.
13. How synchronization can be achieved between threads in Java? Explain with an
example.
14. Write a Java program to create 4 threads and each thread when run, will sleep for
500 milliseconds and print its name Before Quitting.
15. Summarize the type wrappers supported in Java.
16. Explain Autoboxing/ Unboxing that occurs in expression and operators.