Given
11. public interface Status {
12. /* insert code here */ int MY_VALUE = 10;
13. }
12?
Which three are valid on line (Choose three.)
A.
final
B.
static
C.
native
D.
public
E.
private
F.
abstract
G.
protected
Given
11. public interface Status {
12. /* insert code here */ int MY_VALUE = 10;
13. }
12?
Which three are valid on line (Choose three.)
Given
11. public interface Status {
12. /* insert code here */ int MY_VALUE = 10;
13. }
12?
Which three are valid on line (Choose three.)
A.
final
B.
static
C.
native
D.
public
E.
private
F.
abstract
G.
protected
A,B,D are correct. An attribute in an Interface is implicit a constant (public final static…).But it means we can define them again without a problem.
C is wrong, native is just allowed for a method, never for attribute or variable.
E and G is againts D –>
F is againts A –> (they are never defined together!)