Question 42 / 297:  Which of the following variables is incorrectly declared?
public abstract interface Bouncable {

int a = 0;

public int b = 1;

public static int c = 2;

public static transient int d = 3;

public final int e = 3;

public static final int f = 3;

}

A  a
B  b
C  c
D  d
E  e
F  f
<< First < Previous Next > Last >>
Explanation:

Data members declared in an interface are by default public static final. In another word they are constants.

"transient", "private" and "protected" modifiers are not accepted when marking data members in an interface.

For methods in an interface, only "public" and "abstract" are allowed

Exam Home Page
Ask
Dewey Compton
Start Exam
Copy and paste the following HTML code into your website or blog.
<iframe src="https://www.jobilize.com/embed/java-certification-questions" width="600" height="600" frameborder="0" marginwidth="0" marginheight="0" scrolling="yes" style="border:1px solid #CCC; border-width:1px 1px 0; margin-bottom:5px" allowfullscreen webkitallowfullscreen mozallowfullscreen> </iframe>