Subject not found.
1.

What type of variable can be defined in an interface?(a) public static(b) private final(c) public final(d) static finalThis question was addressed to me during an interview for a job.Asked question is from Interfaces in section Interfaces & Packages of Java

Answer»

Correct OPTION is (d) STATIC final

To explain: variable DEFINED in an interface is implicitly final and static. They are usually written in capital LETTERS.



Discussion

No Comment Found

Related InterviewSolutions