Multiple choice

Read the following statements and choose the correct option. P) Abstract class can be instantiated. Q) Abstract class must contain at least one abstract method. R) All variables declared in interface are implicitly static in nature. S) All methods declared in interface are implicitly abstract in nature.

  1. All the statements are true.

  2. Only R, S are true.

  3. Only Q, R, S are true.

  4. Only Q is true.

  5. Only P, R, S are true.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

P) Abstract class cant be instantiated , rather we instantiate sub classes which extends abstract classes. Q) Yes, abstract should contain atleast one abstract method. If there is no abstract method, then it doesnt have any difference with general class. R) Yes , all variables declared in interface are implicitly static , public ,final & public. S) Yes, all the mehods in interface all implicitly abstract in nature which makes interface as pure abstract class. Hence Q,R and S are true.