You are on page 1of 1

III Assignment

Open Elective (Programming in Java- CSE3290)

1. Define an exception class called PowerFailureException. The class


should have a constructor with no parameters. If an exception is
thrown with this zero argument constructor, getMessage should return
"Power Failure!" The class should also have a constructor with a
single parameter of type String. If an exception is thrown with this
constructor, then getMessage returns the value that was used as an
argument to the constructor.

2. a) Compare thread based and process based multitasking.


b) Give skeleton of an applet program and explain.

3. What is object serialization? Explain with an example program.

4. a) Explain the method for writing multithreaded program using


extends Thread method.
b) What is synchronization? Why do we need it?

5. a) List and explain predefined streams in Java.


b) Write program to copy one file to the another using character
oriented stream classes from java.io.package.

You might also like