21. Thread class is available in________________? A. java.lang package B. java.util package C. java.awt package D. java.io package ✅ The correct answer is option A.
22. The following fraction of code double STATIC = 2.5 ; System.out.println( STATIC ); ? A. Prints 2.5 B. Raises an exception C. Raises an error as STATIC is used as a variable which is a keyword D. None of these ✅ The correct answer is option A.
23. Inheritance means ? A. Sub class create object of super class B. Sub class extends Base class C. Sub class extends super class D. All of the above ✅ The correct answer is option C.
24. In Java byte, short, int and long all of these are ____________? A. signed B. unsigned C. Both of the above D. None of these ✅ The correct answer is option A.
25. If method have same name as class name and method don’t have any return type then it is known as______________? A. Constructor B. Destructors C. Variable D. Object ✅ The correct answer is option A.
26. The smallest integer type is _____________ and its size is____________ bits? A. short, 8 B. byte, 8 C. short, 16 D. short, 16 ✅ The correct answer is option B.
27. 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 ✅ The correct answer is option A.
28. Runnable is_______________? A. Interface B. Class C. Variable D. Method ✅ The correct answer is option A.
29. Converting a primitive type data into its corresponding wrapper class object instance is called ________________? A. boxing B. wrapping C. autoboxing D. instantiation ✅ The correct answer is option C.
30. javah stands for ? A. java dissasamebler B. java header file C. java interpreter D. java compiler ✅ The correct answer is option B.