Tuesday, 4 April 2017

NIELIT A Level Java Solve Paper Jan-14

 January, 2014
A10.1-R4: INTRODUCTION TO OBJECT ORIENTED PROGRAMMING THROUGH JAVA


PART ONE

(Answer all the questions)


1. Each question below gives a multiple choice of answers. Choose the most appropriate one and enter in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)


1.1 Methods used to obtain information about an object are known as

A) accessor methods

B) setter methods

C) mutator methods

D) none of the above

1.2 Which of the following is the mutable wrapper class?

A) Integer

B) BigInteger

C) Boolean

D) Character

1.3 Range and behavior for a primitive type in Java is to be supported by

A) Java Virtual Machine

B) Operating system

C) User

D) All of the above

1.4 Which of the following is the method of the interface Enumeration?

A) keys()

B) hasMoreElement()

C) nextElement()

D) elements()

1.5 Java’s exception handling mechanism is meant to handle

A) only compile time errors

B) only syntax errors

C) only runtime errors

D) both runtime and compile time errors.

A10.1-R4 Page 2 of 5 January, 2014

1.6 Which of the following swing component is a source of ItemEvent?

A) JPopupMenu

B) JLabel

C) JTextField

D) JComboBox

1.7 All collection classes are available in ________ package.

A) java.io

B) java.util

C) java.awt

D) java.lang

1.8 In a UML diagram, generalization is indicated by

A) Arrow from subclass to super class

B) Arrow from super class to subclass

C) Line with a diamond at super class

D) Line with a diamond at subclass

1.9 What is the output of the following program?


class MyClassTest

{        public static void main(String[] args)
{        int y;
System.out.println("Begin Main"); y=testMethod(); System.out.println("End Main");
}
static float testMethod()
{   System.out.println("Inside TestMethod()"); return 10;
}
}


A) 10

B) 10.0

C) Compilation Error

D) None of the above

1.10 Which of the following is a built in dialog that lets a user select a file?

A) JFileInputChooser

B) JFileSelector

C) JFileInputSelector

D) JFileChooser



2. Each statement below is either TRUE or FALSE. Choose the most appropriate one and ENTER in the “OMR” answer sheet supplied with the question paper, following instructions therein. (1x10)


2.1 An abstract Data type is a term referring to an abstract class.

2.2 Generics are implemented by Type Erasure.

2.3 JRE cannot be installed independent of JDK.

2.4 The instanceof operator results in the value of type boolean.

2.5 The default layout manager for javax.swing.JApplet class is BorderLayout.

2.6 The readObject() is a method of Serializable interface.

2.7 An inner class can have static members.

2.8 An exception in Java is represented by instances of the Throwable class or any of its

sub-classes.

2.9 In order to capture the events when mouse moves, the MouseListener is used.

2.10 System.in is a predefined stream variable of public, final and static type.


3. Match words and phrases in column X with the closest related meaning/

word(s)/phrase(s) in column Y. Enter your selection in the “OMR” answer sheet supplied

with the question paper, following instructions therein. (1x10)



X
Y
3.1
Event is generated by
A.
Interaction
3.2
To arrange components as row/columns
B.
ActionListener
3.3
Frame
C.
GridLayout
3.4
FileWriter extends
D.
Source object
3.5
Aggregation
E.
immutable object
3.6
DataOutputStream
F.
reverse() method
3.7
String
G.
Association
3.8
Panel is the immediate super class of
H.
OutputStreamWriter
3.9
StringBuffer
I.
BorderLayout
3.10
Collaboration
J.
JApplet


K.
OutputStream


L.
Applet


M.
Assertion


4. Each statement below has a blank space to fit one of the word(s) or phrase(s) in the list

below. Enter your choice in the “OMR” answer sheet supplied with the question paper,

following instructions therein. (1x10)


A.
java.sql.Driver
B.
JIT
C.
draw3DString
D.
Archive
E.
drawString
F.
Unicode
G.
Class
H.
void
I.
Sequence
J.
java.sql.DriverManager
K.
Delegation
L.
Case
M.
java.util.Date





4.1 To optimize the execution of the Java bytecode, the JVM uses a ________.

4.2 ________ is a keyword in Java.

4.3 Java uses ________ character set to represent text data.

4.4 The return type for the static method forName() which takes String as parameter in the

java.lang.Class class is ________.

4.5 The static method of ________ class is used to get an instance of java.sql.Connection.

4.6 The ________ parameter in the APPLET tag is used in a HTML page to specify the jar file on

the server from where classes can be loaded.

4.7 ________ diagram is used for displaying the interactions among objects along a time line.

4.8 An alternative to inheritance that one should always consider is ________.

4.9 The class java.sql.Timestamp has its super class as ________.

4.10 The Graphics object uses ________ method to draw text value on the component.


PART TWO

(Answer any FOUR questions)


5.

a) Which are the applications of Object Oriented Programming Language?

b) Explain constructor and finalization in brief.

c) What are Checked and Unchecked Exception?

(6+5+4)

6.

a) Write a short note on java.io.File class.

b) Explain the different types of resultset in JDBC.

c) Explain the difference between the Comparable and the Comparator interfaces.

(5+5+5)

7.

a) Compare abstraction and encapsulation.

b) Explain with example what is meant by the statement “method binding is done at run time”.

c) Write a short note on JComponent class.

(5+5+5)

8.

a) Briefly discuss following terms with reference to UML class diagrams:

i) Qualified association.

ii) Association classes

b) Explain the three classes of java.util.regex package in brief?

(8+7)

9.

a) What are the advantages of Java? Explain in brief.

b) Describe Event Delegation Model in detail.

(8+7)


Download PDF

                                                                               Next Set