ALCCS
NOTE:
· Question 1 is compulsory and
carries 28 marks. Answer any FOUR questions from the rest. Marks are indicated against each question.
· Parts of a question should be
answered at the same place.
Q.1 a. Write a note on Java class loaders.
b. Explain life cycle of a thread
with help of a diagram. How do the wait
and notifyAll
/notify
methods enable cooperation between
threads?
c. Write a small java program containing user
defined exceptions.
d. Differentiate final, finally and finalize with
reference to java.
e. Explain the drawPolygon () method of Polygon
class with the help of an example.
f. How java swing controls differs from java AWT
controls.
g.
Discuss MouseListenener interface and
list out its functions. (7
4)
Q.2 a. Explain the benefits and applications of
OOP in detail.
b. How does Java handle strings? Describe the
constructors of String and StringBuffer classes. (9+9)
Q.3 a. What
are the advantages of using interfaces in Java?
How are they different from Abstract Classes?
b. Explain Method overloading & Method
overriding with suitable example. Can you overload operators in java? (9+9)
Q.4 a. How do we design a package? What are the steps to add classes and
interfaces in a package? Give suitable
example.
b. Explain Multithreading. How
java implements its thread Model? (9+9)
Q.5 a. Discuss
the Java error handling mechanism? What is the difference between ‘unchecked exceptions’ and ‘checked exceptions’? What is the
implication of catching all the exceptions with the type “Exception”?
b. Write a Java program to copy one file to
another file with the help of byte stream classes. (9+9)
Q.6 a. Describe
different types of Layout Manager (Flow Layout, Grid Layout, and Border Layout)
in Java using suitable examples.
b. How java implements UDP protocol? Discuss various
classes available in Java to support UDP protocol. (9+9)
Q.7 a. List
Three UI components of swings, their classes and constructors.
b. Explain the Applet life cycle. Also discuss Applet
Tag used in HTML and attributes used in Applet Tag giving suitable example.