Java concepts and its programming MCQs

80 MCQs  — Computer Programming MCQs  (Page 3 of 8)

JIT meaning ?
A. Just in time
B. Java in time
C. Join in time
D. None of above
Suppose a class has public visibility. In this class we define a protected method. Which of the following statements is correct ?
A. From within protected methods you do not have access to public methods.
B. This method is only accessible from inside the class itself and from inside all subclasses.
C. In a class, you cannot declare methods with a lower visibility than the visibility of the class in which it is defined.
D. This method is accessible from within the class itself and from within all classes defined in the same package as the class itself.
Which method executes only once ?
A. Stop() method
B. Start() method
C. Init() method
D. Destroy() method
Which method of the Applet class displays the result of applet code on screen ?
A. Paint() method
B. Main() method
C. Run() method
D. Drawstring() method
javah stands for ?
A. Java dissasamebler
B. Java header file
C. Java interpreter
D. Java compiler
A method within a class is only accessible by classes that are defined within the same package as the class of the method. Which one of the following is used to enforce such restriction ?
A. Declare the method with the keyword public.
B. Declare the method with the keyword private.
C. Do not declare the method with any accessibility modifiers.
D. Declare the method with the keyword public and private.