Ch No 4
1. Explain exception handling mechanism. w.r.t. try, catch, throw and finally.
2. Write the syntax of try-catch-finally blocks.
3. Define error. List types of error.
4. Draw and explain life cycle of Thread.
5. Define exception. State built-in exceptions.
6. Write a program to input name and salary of employee and throw user defined exception
if entered salary is negative.
7. Write a program to create two threads one thread will print even no. between 1 to 50 and
other will print odd number between 1 to 50.Define thread priority? Write default priority
values.
Ch No 5
1. Write a java applet to display the following output in Red color. Refer Fig No. 1. (4 m)
Fig No. 1.
2. Write syntax of elipse. (2 m)
3. Explain(4 m)
i. drawLine
ii. drawOval
iii. drawRect
iv. drawArc
4. Give the syntax of < param > tag to pass parameters to an applet. . (2 m)
5. Differentiate between Java Applet and Java Application ( any four points) . (4 m)
6. Describe the applet life cycle in detail. . (4 m)
7. Describe the use of following methods:
i. Drawoval ( )
ii. getFont ( )
iii. drawRect ( )
iv. getFamily ( )
8. define attributes available in applet tag.
Ch No 6
1. Define stream class. List its types.(2 M)
2. Explain any two methods of File Class.(2M)
3. List the methods of File Input Stream Class.(2M)
4. Write a Java program to count the number of words from a text file
using stream classes.(4M)
5. Write a program to copy content of one file to another file.(4M)
6. Write a program to count number of words from a text file using
stream classes. (4M)
7. Distinguish between Input stream class and output stream class. (4M)
8. Explain the following classes.
i. Byte Stream Class
ii. Character Stream Class
9. Write a program to perform following task.
I. Create a text file and store data in it.
II. Count number of lines and words in that file.