You are on page 1of 1

Assignment-2

Subject: OOP using Java

1. Explain thread life cycle in Java. What are the methods of creating threads in java?
2. What do you understand by exception? Explain
A. Types of exception
B. Explain exception keywords: try, catch, finally, throw, throws.

3. WAP to explain user defined exception and create a user defined exception and throw
it in another class?
4. What is the difference between throw, throws keyword in java?
5. Why multiple inheritance is not supported by java. How can we implement multiple
inheritance. Explain by a program.
6. Write a java program to create an Employee class (eid, ename, salary) and inherit two
classes Technician(service_type) and Engineer (Project_Name). Create objects of
both Technician and Engineer classes and initialize data members of these classes and
display also.
7. Write a java program to create the thread to print the number in reverse order by
extending the Thread class.
8. To write a java program for generating two threads, one for generating even number
and one for generating odd number.

9. WAP of performing reading and writing operation using FileReader and FileWriter
class.
10. Write differences between abstract class and interface.
11. Write difference between comparator and comparable interface. Explain it by
programs.
12. What do you understand about package? Explain different methods of creating
packages.

You might also like