Card 34 / 37: public class Program1 { static final long tooth = 343L; static long doIt(long tooth){ System.out.println(++tooth+ " "); return ++tooth; } public static void main(String[] args) { System.out.println(tooth+ " "); final long tooth = 340L; new Program1().doIt(tooth); System.out.println(tooth); } } output ?
A)
343 341 340
B)
Compilation fails.
C)
Type Cast Exception
D)
343 343 343
Answer:
A) 343 341 340
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |
|