πŸ“Š JAVA
Q. Identify the type of inheritance when two or more subclasses inherit the properties of a super class.
  • (A) Multiple inheritance
  • (B) Single inheritance
  • (C) Multilevel inheritance
  • (D) Hierarchical inheritance
πŸ’¬ Discuss
βœ… Correct Answer: (D) Hierarchical inheritance
πŸ“Š JAVA
Q. The keyword used inside a class to refer to its immediate super class is
  • (A) super
  • (B) parent
  • (C) base
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) super
πŸ“Š JAVA
Q. Which of the following is true in the case of abstract class
  • (A) Abstract constructors cannot be created.
  • (B) Abstract classes can not be inherited.
  • (C) An abstract class contains only abstract methods.
  • (D) All of the above.
πŸ’¬ Discuss
βœ… Correct Answer: (A) Abstract constructors cannot be created.
πŸ“Š JAVA
Q. Which of these keywords are used to define an abstract class?
  • (A) abst
  • (B) abstract
  • (C) Abstract
  • (D) abstract class
πŸ’¬ Discuss
βœ… Correct Answer: (B) abstract
πŸ“Š JAVA
Q. If a class inheriting an abstract class does not define all of its function then it will be known as?
  • (A) abstract
  • (B) A simple class
  • (C) Static class
  • (D) None of the mentioned
πŸ’¬ Discuss
βœ… Correct Answer: (A) abstract
πŸ“Š JAVA
Q. Which of these is not a correct statement?
  • (A) Every class containing abstract method must be declared abstract.
  • (B) Abstract class defines only the structure of the class not its implementation.
  • (C) Abstract class can be initiated by new operator
  • (D) Abstract class can be inherited.
πŸ’¬ Discuss
βœ… Correct Answer: (C) Abstract class can be initiated by new operator
πŸ“Š JAVA
Q. Which method defined in Integer class can be used to convert a whole number in string type to primitive int type.
  • (A) valueOf()
  • (B) intValue()
  • (C) parseInt()
  • (D) getInteger()
πŸ’¬ Discuss
βœ… Correct Answer: (C) parseInt()
πŸ“Š JAVA
Q. The method sqrt() is defined in the class
  • (A) System
  • (B) Root
  • (C) Math
  • (D) Arithmetic
πŸ’¬ Discuss
βœ… Correct Answer: (C) Math
πŸ“Š JAVA
Q. A primitive data type can be passed as an argument into a method
  • (A) By value
  • (B) by reference
  • (C) both a & b
  • (D) none of these
πŸ’¬ Discuss
βœ… Correct Answer: (A) By value
πŸ“Š JAVA
Q. Which of these is used as default for a member of a class if no access specifier is used for it?
  • (A) private
  • (B) public
  • (C) public, within its own package
  • (D) protected
πŸ’¬ Discuss
βœ… Correct Answer: (C) public, within its own package