Zusammenfassung der Ressource
Frage 1
Frage
201. Which of the following has member elements?
Antworten
-
a) Class
-
b) Interface
-
c) Both
-
d) None
Frage 2
Frage
202. Which of the following can be used for implementing runtime polymorphism ?
Antworten
-
a) Class
-
b) Interface
-
c) Both
-
d) None
Frage 3
Frage
203. Parent of all collection classes is a/an ….?
Antworten
-
a) Class
-
b) Interface
-
c) Both
-
d) None
Frage 4
Frage
204. Which exception is thrown by the read() method of InputStream class?
Antworten
-
a) IOException
-
b) FileNotFoundException
-
c) ReadException
-
d) Exception
Frage 5
Frage
205. Which of the following methods can be used to remove a java.awt.Component object from the display?
Antworten
-
a) remove()
-
b) disappear()
-
c) hide()
-
d) delete()
Frage 6
Frage
206. Which of the following sets the frame to 300 pixels wide by 200 high?
Antworten
-
a) frm.setSize( 300, 200 );
-
b) frm.setSize( 200, 300 );
-
c) frm.paint( 300, 200 );
-
d) frm.setVisible( 300, 200 );
Frage 7
Frage
207. What is a Graphics object?
Antworten
-
a) The Graphics object represents the part of the Frame that you can draw on.
-
c) The Graphics object represents the entire monitor.
-
b) The Graphics object represents the whole Frame
-
d) The Graphics object represents the graphics board.
Frage 8
Frage
208. In Java, the default layout manager for a JFrame component is
Antworten
-
a) BorderLayout
-
b) GridBagLayout
-
c) FlowLayout
-
d) GridLayout
Frage 9
Frage
209. The ListSelectionEvent class and ListSelectionListener interface are available in the _____ package of Java.
Antworten
-
a) java.awt.event
-
b) javax.swing.event
-
c) javax.event
-
d) java.event
Frage 10
Frage
210. Which of the following categorizations can be applied to both the data fields and the methods in a Java class?
Frage 11
Frage
211. Which is a Java access modifier used to designate that a particular data field will not be inherited by a subclass?
Antworten
-
a) protected
-
b)final
-
c)private
-
d) default
Frage 12
Frage
212. Which of these will happen if recursive method does not have a base case?
Antworten
-
a) An infinite loop occurs
-
c) After a lot of calls it will be automatically stopped.
-
b) System stops the program after some time.
-
d) None of the above
Frage 13
Frage
213. Which of these is not a correct statement?
Antworten
-
a) A recursive method must have a base case.
-
b) Recursion always uses stack.
-
c) Recursive methods are faster that programmers written loop to call the function repeatedly
-
d) Recursion is managed by Java’s run time environment.
Frage 14
Frage
214. Which of these packages contains the exception Stackoverflow in Java?
Antworten
-
a) java.lang
-
b) java.util
-
c) java.io
-
d) java.system