Java OCA OCP Practice Question 1129

Question

Which of the following are valid declarations within a class?

Select 2 options

  • A. volatile int k;
  • B. abstract boolean bool;
  • C. native float radix;
  • D. friendly int ArrayList;
  • E. int friendly, ArrayList;


Correct Options are  : A E

Note

fields cannot be abstract.

variables cannot be native.

friendly is not a valid keyword in Java.

Any class name can be used as a variable name.




PreviousNext

Related