Card 20 / 54: Given: public class Frodo extends Hobbit { public static void main(String[] args) { Short myGold = 7; System.out.println(countGold(myGold, 6)); } } class Hobbit { int countGold(int x, int y) { return x + y; } } What is the result?
A)
13
B)
Compilation fails due to multiple errors
C)
Compilation fails due to an error on line 6
D)
Compilation fails due to an error on line 7
E)
Compilation fails due to an error on line 11
Answer:
D) Compilation fails due to an error on line 7
Previous Card | ← Previous Card Button |
Next Card | → Next Card Button |
Flip Card | Space-Bar |