Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
180 views

Java Notes

The document is a question paper for a Java programming exam. It contains 6 questions with multiple subparts each testing knowledge of Java concepts like OOPs, threads, exceptions, I/O etc. Students are instructed to answer questions in detail on separate pages and assume data where required. Mobile devices are banned in the exam hall.

Uploaded by

hidag66550
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
180 views

Java Notes

The document is a question paper for a Java programming exam. It contains 6 questions with multiple subparts each testing knowledge of Java concepts like OOPs, threads, exceptions, I/O etc. Students are instructed to answer questions in detail on separate pages and assume data where required. Mobile devices are banned in the exam hall.

Uploaded by

hidag66550
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

22412

22223
3 Hours / 70 Marks Seat No.

Instructions – (1) All Questions are Compulsory.


(2) Answer each next main Question on a new page.
(3) Illustrate your answers with neat sketches wherever
necessary.
(4) Figures to the right indicate full marks.
(5) Assume suitable data, if necessary.
(6) Mobile Phone, Pager and any other Electronic
Communication devices are not permissible in
Examination Hall.

Marks

1. Attempt any FIVE of the following: 10


a) Define the terms with example
i) Class
ii) Object
b) Enlist any two access specifier with syntax.
c) Give a syntax to create a package and accessing package in
java
d) Give a syntax of following thread method
i) Notify ( )
ii) Sleep ( )
e) Give a syntax of 〈param〉 tag to pass parameters to an applet.
f) Define stream class and list types of stream class.
g) Give use of garbage collection in java.

P.T.O.
22412 [2]
Marks
2. Attempt any THREE of the following: 12
a) Describe type casting in java with example.
b) Differentiate between string and string buffer class
(any four points)
c) Write a program to create a user defined exception in java.
d) Write a program for reading and writing character to and from
the given files using character stream classes.

3. Attempt any THREE of the following: 12


a) Write a program to print all the Armstrong numbers from
0 to 999.
b) Explain the applet life cycle with neat diagram.
c) Describe the package in java with suitable example.
d) Enlist types of Byte stream class and describe input stream
class and output stream class.

4. Attempt any THREE of the following: 12


a) Describe any four features of java.
b) Explain any four methods of vector class with example.
c) Describe interface in java with suitable example.
d) Write an applet program for following graphics method.
i) Drawoval ( )
ii) Drawline ( )
e) Enlist any four methods of file input stream class and give
syntax of any two methods.
22412 [3]
Marks
5. Attempt any TWO of the following: 12
a) Write a program to copy all elements of one array into
another array.
b) Write a program to implement the following inheritance.
Refer Fig. No. 1.

Fig. No. 1
c) Write a program to print even and odd number using two
threads with delay of 1000ms after each number.

6. Attempt any TWO of the following: 12


a) Explain thread life cycle with neat diagram.
b) Write a program to generate following output using
drawline ( ) method. Refer Fig. No. 2.

Fig. No. 2
c) Explain constructor with its type. Give an example of
parameterized constructor.

You might also like