Interview Questions on Core Java Language set-3 Java Multiple Choice Question (MCQ) 1) The CODE value in an ......... tag must name a class file that is in the same directory as the calling HTML page.A. (applet)B. >applet<C. D. 2) A class can be converted to a thread by implementing the interface ..........A. Thread B. RunnableC. StartD. Yield3) Which of the following classes are not available in the java.lang package?A. Stack B. ObjectC. MathD. String4) State True or False for the following statements.i) Reader class has a method that can read and return floats and doublesii) It is possible to use the File class to list the contents of the current of the working directoryA. i-True, ii-FalseB. i-False, ii-True C. i-True, ii-TrueD. i-False, ii-False5) The setBackground() method is part of the following class in JAVA.awt package.A. ComponentB. GraphicsC. AppletD. Container6) Which method is used to set the text of a Label object?A. setText()B. setLabel()C. setTextLabel()D. setLabelText()7) Which of the following statement is/are True?i) A Java monitor must either extend Thread class or implement Runnable interfaceii) The CheckboxGroup class is a subclass of the component classA. i- onlyB. ii- onlyC. Both i and iiD. None of the above8) When we invoke repaint() for JAVA.awt.Component object, the AWT invokes the method .......A. update()B. draw()C. show()D. paint()9) Which of the following methods are invoked by the AWT to support paint and repaint operations?A. paint()B. repaint()C. draw()D. redraw()10) A thread can make a second thread ineligible for execution by calling the ......... method on the second thread.A. second()B. suspend()C. append()D. yield()11) When we implement the Runnable interface, we must define the methodA. run()B. start()C. init()D. main()12) Which of the following are passed as an argument to the paint() method?A. A Canvas objectB. A Graphics objectC. An image objectD. A paint object13) State whether the following statements are True or False.i) A class may be both abstract and finalii) A final class may not have any abstract methodsiii) Frames and applets cannot be used together in the same program.A. i-True, ii-True, iii-FalseB. i-True, ii-False, iii-True C. i-False, ii-True, iii-FalseD. i-False, ii-True, iii-True14) The methods wait() and notify() are defined in?A. java.lang.StringB. java.lang.ObjectC. java.lang.RunnableD. java.lang.Thread15) Which of the following components generate action events?A. Buttons B. LabelsC. Check boxesD. Windows16) Which javadoc tag is used to denote a comment for a method parameter?A. @methodB. @parameterC. @arjumentD. @param17) Which of the following are not the wrapper classes?A. ByteB. VectorC. IntegerD. Short18) Which of the following classes is used to perform basic console I/O?A. systemB. security ManagerC. mathD. runtime19) Which of the following command lines options generates documentation for all classes and methods?A. -protected B. -publicC. -privateD. -verbose20) What is java_g used for?A. Using the jdb tool B. Executing a class with optimization turned offC. To provide information about deprecated methodsD. None of the aboveAnswers:1) C. 2) B. Runnable3) A. Stack 4) A. i-True, ii-False5) A. Component6) A. setText()7) D. None of the above8) A. update()9) A. paint()10) C. append()11) A. run()12) B. A Graphics object13) C. i-False, ii-True, iii-False14) B. java.lang.Object15) A. Buttons 16) D. @param17) B. Vector18) A. system19) C. -private20) B. Executing a class with optimization turned offRelated Posts: Java Multiple Choice Questions With Answers set-6 MCQ of Java With Answer set-7 Java Multiple Choice Questions With Answers set-8 Java Objective Questions with Answers set-9 Java MCQ Interview Questions With Answers set-10MCQ on Java Programming With Answers set-11MCQ on Java Programming Language Fundamental set-12MCQ on Core Java with Answers set-1Solved MCQ on Fundamental of Java Language set-14Interview Questions on Overview of Java set-15 Share this Share on FacebookTweet on TwitterPlus on Google+