Card 7 / 32: Given two files: package xcom; public class Stuff { public static final int MY_CONSTANT = 5; public static int doStuff(int x) { return (x++)*x; } } import xcom.Stuff.*; import java.lang.System.out; class User { public static void main(String[] args) { new User().go(); } void go() { out.println(doStuff(MY_CONSTANT)); } } What is the result?
A)
5
B)
6
C)
compilation error
D)
run time Exception
E)
None of the above
Answer:
C) compilation error
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|