You are on page 1of 3

Date:24/06/2017 Enrolment No.

:___________________

RK UNIVERSITY
D.ENGG./SEM-IV/SUPPLEMENTARY/JUNE-2017

DCE515: JAVA PROGRAMMING

Time: 09:00 AM TO 12:00 PM Total Marks: 100

Instructions:
1. Attempt all questions.
2. Make suitable assumptions wherever necessary.
3. Figures to the right indicate full marks.
4. Programmable calculator is not permissible.

SECTION – I

Q.1 (a) State whether the following statements are true or false. 10
1. We can access static methods without creating object of
the class in which method is defined.
2. Double class is a wrapper class for double primitive
data types.
3. All the command line arguments are stored in String
array.
4. To compile java file, we can use javac command.
5. To differentiate the values of member variables and
local variables within the same class, we can use “this”
keyword.
6. We can create object of an abstract class.
7. Inheritance means ability to take more than one forms.
8. To compare two different strings, we can use compare()
method.
9. Package section is compulsory section in java program.
10. We can extend more than one classes into a single
class.

(b) Define Constructor. Explain all types in details with an 06


example.

Q.2 (a) List features of java and explain any four features in details. 06
(b) Differentiate method overloading and method overriding with 05
an example.
(c) State and explain use of “this” keyword with an example. 05
OR
Page 1 of 3
Q.2 (a) 1) Explain the concept of nested class in java with an 06
example.
2) Explain use of Scanner class in java with an example.
(b) Differentiate String and StringBuffer class. Explain any two 05
methods of both.
(c) Write a java program to check whether a number is prime or 05
not.

Q.3 (a) Define following terms: 06


1) Inheritance 2) Abstraction 3) Polymorphism
4) Encapsulation 5) Interface 6) Abstract class
(b) Why do we need package in java? How can we create package 06
in java? How can we import package in java? Explain these
with an example.
(c) Write a java program to find minimum number from the 06
entered numbers.
OR
Q.3 (a) Differentiate widening and narrowing conversion with an 06
appropriate example.
(b) Write a java program to implement multiple inheritance in 06
java.
(c) Explain the concept of variable length argument in java with 06
an example.

SECTION – II

Q.4 (a) Give the appropriate answer from the following questions: 10
1. The Layout manager is set by the ___________method.
(a) setLayout( ) (b) setIndex( )
(c)showLayout( ) (d)show( )
2. AWT stands for____________________.
(a) abstract writing toolkit (b) abstract window toolkit
(c) advanced window tool (d) all window table
3.__________ method is used to start thread execution.
(a) init( ) (b) resume( ) (c) go( ) (d) start( )
4. ___________keyword is used to throw manually exception.
(a) try (b) throw (c) catch (d) finally
5. Applet can be embedded in a________ file.
(a) jpeg (b) doc (c) html (d) port
6. Which method is called to print output of an applet?
(a) display( ) (b) display html
(c) print( ) (d) printapplet( )
7. The part of the code that tells what to do when an exception
occurs is called the catch block. (True / False).
Page 2 of 3
8. Applet do not need a main ( ) method (True / False).
9.Container is component in AWT that contain other
component like buttons, text fields, labels etc.
True / False.
10. Thread can acquire a lock by using synchronized keyword.
(True / False).

(b) What is thread? Explain complete life cycle of thread. 06

Q.5 (a) Explain exception handling mechanism with example. 06


(b) What is applet? Write an applet to draw oval shape. 05
(c) Explain thread priorities with example. 05
OR
Q.5 (a) Write a java program that is used to implement user defined 06
exception.
(b) Explain pushbutton control in AWT. 05
(c) Explain with example how to create a frame window in an 05
applet.

Q.6 (a) Explain life cycle of an applet. 06


(b) Explain isAlive ( ) and join ( ) with appropriate syntax. 06
(c) Explain nested try statements with example 06
OR
Q.6 (a) Explain how to create thread using implementing Runnable 06
interface.
(b) Explain passing parameters to applets using getParameter ( ) 06
method.
(c) Write program for grid layout that creates a 4x4 grid and fills 06
it in with 15 buttons, each labeled with its index (1 to 15).

*************

Page 3 of 3

You might also like