Filters
Question type

Study Flashcards

Which of the following is correct way of implementing an interface salary by class manager?


A) class Manager extends salary {}
B) class Manager implements salary {}
C) class Manager imports salary {}
D) None of the mentioned.

E) A) and B)
F) A) and C)

Correct Answer

verifed

verified

Which of these is correct way of inheriting class A by class B?


A) class B + class A {}
B) class B inherits class A {}
C) class B extends A {}
D) class B extends class A {}

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

Which of these methods are used to register a mouse motion listener?


A) addMouse()
B) addMouseListener()
C) addMouseMotionListner()
D) eventMouseMotionListener()

E) None of the above
F) All of the above

Correct Answer

verifed

verified

Which of the following is incorrect statement about packages?


A) Package defines a namespace in which classes are stored.
B) A package can contain other package within it.
C) Java uses file system directories to store packages.
D) A package can be renamed without renaming the directory in which the classes are stored.

E) None of the above
F) All of the above

Correct Answer

verifed

verified

D

Consider the following list. int[] intList = {35, 12, 27, 18, 45, 16, 38}; What is the minimum number of comparisons that have to be made to find 18 using a sequential search on intList?


A) 1
B) 2
C) 3
D) 4

E) A) and B)
F) None of the above

Correct Answer

verifed

verified

Which of the following are true about interfaces.


A) Methods declared in interfaces are implicitly private.
B) Variables declared in interfaces are implicitly public, static, and final.
C) An interface contains any number of method definitions.
D) The keyword implements indicate that an interface inherits from another.

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Which command disassembles a class file


A) javaamd
B) javacmd
C) java
D) javap

E) B) and C)
F) A) and D)

Correct Answer

verifed

verified

D

Which of these packages contains all the classes and methods required for even handling in Java?


A) java.applet
B) java.awt
C) java.event
D) java.awt.event

E) A) and D)
F) None of the above

Correct Answer

verifed

verified

To design a general-purpose search method, searchList, to search a list, which of the following must be parameters of the method searchList? (i) The array containing the list. (ii) The length of the list. (iii) The search item. (iv) A boolean variable indicating whether the search is successful.


A) (i) and (ii)
B) (i) , (ii) , and (iii)
C) (ii) , (iii) , and (iv)
D) (i) , (ii) , (iii) , and (iv)

E) B) and D)
F) B) and C)

Correct Answer

verifed

verified

For the interface WindowListener that contains more than one method, Java provides the class ____.


A) MouseAdapter
B) WindowAdapter
C) KeyListener
D) KeyAdapter

E) A) and C)
F) A) and D)

Correct Answer

verifed

verified

Which of these class contains the methods print() & println() ?


A) System
B) System.out
C) BufferedOutputStream
D) PrintStream

E) All of the above
F) A) and B)

Correct Answer

verifed

verified

What is a listener in context to event handling?


A) A listener is a variable that is notified when an event occurs.
B) A listener is a object that is notified when an event occurs.
C) A listener is a method that is notified when an event occurs.
D) None of the mentioned

E) A) and D)
F) B) and C)

Correct Answer

verifed

verified

Which method in Thread class is used to check weather a thread is still running?


A) isAlive()
B) Join()
C) isRunning()
D) Alive()

E) B) and C)
F) A) and B)

Correct Answer

verifed

verified

In which package is the class Vector located?


A) java.io
B) java.lang
C) java.util
D) java.text

E) A) and B)
F) B) and C)

Correct Answer

verifed

verified

Which of the following statements is false as far as different type of statements is concern in JDBC?


A) Regular Statement
B) Prepared Statement
C) Callable Statement
D) Interim Statement

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

Which exception is thrown by read() method?


A) IOException
B) InterruptedException
C) SystemException
D) SystemInputException

E) None of the above
F) A) and B)

Correct Answer

verifed

verified

What is an event in delegation event model used by Java programming language?


A) An event is an object that describes a state change in a source.
B) An event is an object that describes a state change in processing.
C) An event is an object that describes any change by the user and system.
D) An event is a class used for defining object, to create events.

E) A) and D)
F) All of the above

Correct Answer

verifed

verified

Which of these methods are used to register a keyboard event listener?


A) KeyListener()
B) addKistener()
C) addKeyListener()
D) eventKeyboardListener()

E) B) and C)
F) A) and C)

Correct Answer

verifed

verified

C

Showing 1 - 18 of 18

Related Exams

Show Answer