nerdexam
GIAC

GSSP-JAVA · Question #77

Peter works as a Software Developer for Neon Inc. He is developing an application in Java. He declares an interface. Which of the following field declarations are valid within the body of an…

The correct answer is A. final static int answer=42; B. public static int answer = 42; D. public int answer=42. See the full explanation below for the reasoning.

Question

Peter works as a Software Developer for Neon Inc. He is developing an application in Java. He declares an interface. Which of the following field declarations are valid within the body of an interface? Each correct answer represents a complete solution. Choose three.

Options

  • Afinal static int answer=42;
  • Bpublic static int answer = 42;
  • Cprivate final static int answer=42;
  • Dpublic int answer=42;
  • Eint answer;

How the community answered

(30 responses)
  • A
    73% (22)
  • C
    10% (3)
  • E
    17% (5)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice