Return to site

JAVA CERTIFICATION QUESTION: Initializing standard and final variables in Java

· java,ocp

👉 Generally, every field in an object or class is initialized to a zero-like value during the allocation of memory—but not always.

 

Given the SuperChar class:

 

If the numeric value of the char '1' is 49, what is the result? Choose one.

A. ' 1'

B. '01'

C. '1'

D. ' 49'

E. '49'

F. Compilation fails due to line n2.

G. Compilation fails due to line n3.