πŸ“Š JAVA
Q. Which of the following statements is correct?
  • (A) Public method is accessible to all other classes in the hierarchy
  • (B) Public method is accessible only to subclasses of its parent class
  • (C) Public method can only be called by object of its class.
  • (D) Public method can be accessed by calling object of the public class.
πŸ’¬ Discuss
βœ… Correct Answer: (A) Public method is accessible to all other classes in the hierarchy
πŸ“Š JAVA
Q. Program which executes applet is known as
  • (A) applet engine
  • (B) virtual machine
  • (C) JVM
  • (D) None of above
πŸ’¬ Discuss
βœ… Correct Answer: (A) applet engine
πŸ“Š JAVA
Q. You read the following statement in a Java program that compiles and executes. submarine.dive(depth); What can you say for sure?
  • (A) Depth must be an int
  • (B) Dive must be a method.
  • (C) Dive must be the name of an instance fie
  • (D) None of the above
πŸ’¬ Discuss
βœ… Correct Answer: (B) Dive must be a method.
πŸ“Š JAVA
Q. Which is true about an anonymous inner class?
  • (A) It can extend exactly one class and implement exactly one interface.
  • (B) It can extend exactly one class and can implement multiple interfaces.
  • (C) It can implement multiple interfaces regardless of whether it also extends a class.
  • (D) none
πŸ’¬ Discuss
βœ… Correct Answer: (B) It can extend exactly one class and can implement multiple interfaces.
πŸ“Š JAVA
Q. f a thread is to be declared as a daemon thread, it must be declared before
  • (A) start method
  • (B) run method
  • (C) stop method
  • (D) none
πŸ’¬ Discuss
βœ… Correct Answer: (A) start method
πŸ“Š JAVA
Q. Under what circumstances might you use the yield method of the Thread class
  • (A) To call from the currently running thread to allow another thread of the same or higher priority to run
  • (B) To call on a waiting thread to allow it to run
  • (C) To allow a thread of higher priority to run
  • (D) To call from the currently running thread with a parameter designating which thread should be allowed to run
πŸ’¬ Discuss
βœ… Correct Answer: (A) To call from the currently running thread to allow another thread of the same or higher priority to run
πŸ“Š JAVA
Q. Which of the following is the correct syntax for suggesting that the JVM performs garbage collection?
  • (A) System.free();
  • (B) System.setGarbageCollection();
  • (C) System.out.gc();
  • (D) System.gc();
πŸ’¬ Discuss
βœ… Correct Answer: (D) System.gc();
πŸ“Š JAVA
Q. A class that cannot be a subclass is called as______ class.
  • (A) abstract
  • (B) parent class
  • (C) Final
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (C) Final
πŸ“Š JAVA
Q. When method defined in subclass which has same signature as a method in a super class, it is known as method
  • (A) Overloading
  • (B) Overriding
  • (C) Packing
  • (D) None of these
πŸ’¬ Discuss
βœ… Correct Answer: (B) Overriding
πŸ“Š JAVA
Q. Which of the following statement is correct?
  • (A) For positive numbers, result of operators >> and >>> are same
  • (B) Java provides two operators to do left shift <<< and <<
  • (C) >> is the zero fill right shift operator
  • (D) >>> is the signed right shift operator
πŸ’¬ Discuss
βœ… Correct Answer: (A) For positive numbers, result of operators >> and >>> are same