nerdexam
GIAC

GSSP-JAVA · Question #109

Mark works as a Programmer for InfoTech Inc. He develops the following code snippet. class Auto {public static void main(String args[]) {Character iob ='d';float i=iob;System.out.println(iob);}}…

The correct answer is A. It will display d. See the full explanation below for the reasoning.

Question

Mark works as a Programmer for InfoTech Inc. He develops the following code snippet. class Auto {public static void main(String args[]) {Character iob ='d';float i=iob;System.out.println(iob);}} What will be the result when Mark tries to execute the code snippet?

Options

  • AIt will display d.
  • BIt will show a runtime error.
  • CIt will show a compile-time error.
  • DIt will display 0.00.

How the community answered

(37 responses)
  • A
    70% (26)
  • B
    5% (2)
  • C
    16% (6)
  • D
    8% (3)

Community Discussion

No community discussion yet for this question.

Full GSSP-JAVA Practice