Java 2017 Summer Question Paper
Java 2017 Summer Question Paper
16172
3 Hours / 100 Marks Seat No.
Marks
(b) Write any four methods of file class with their use.
(b) What is package ? State how to create and access user defined package in
Java.
[ 1 of 4 ] P.T.O.
17515 [ 2 of 4 ]
2. Attempt any TWO of the following : 2 8 = 16
(a) Write a program to add 2 integer, 2 string and 2 float objects to a vector.
Remove element specified by user and display the list.
(b) What is meant by interface ? State its need and write syntax and features of
interface.
(a) Explain the following methods of string class with syntax and example :
(i) substring()
(ii) replace()
(c) What is Iterator class ? Give syntax and use of any two methods of Iterator
class.
(i) Codebase
(ii) Alt
(iii) Width
(iv) Code
(a) Write all primitive data types available in Java with their storage sizes in
bytes.
(b) What is thread priority ? Write default priority values and methods to
change them.
(a) Write a program to draw a bar chart for plotting students passing
percentage in last 5 years.
(a) What is exception ? WAP to accept a password from the user and throw
“Authentication Failure” exception if the password is incorrect.
(b) Write a program to create two threads, one to print numbers in original order
and other in reverse order from 1 to 10.
(i) drawRect()
(ii) drawPolygon()
(iii) drawArc()
(iv) drawRoundRect()
P.T.O.
17515 [ 4 of 4 ]
6. Attempt any FOUR of the following : 4 4 = 16
Class : Salary
disp_sal(), hra
(b) What is use of ArrayList class ? State any two methods with their use from
ArrayList.
(c) Design an applet which accepts username as a parameter for html page and
display number of characters from it.
(d) List any four built-in packages from Java API along with their use.
(e) Write a program to accept two numbers as command line arguments and print
the addition of those numbers.
__________