Given:
4. public class Main extends Counter 5. public static void main(String[] args) { 6. int myGold = 7; 7. System.out.println(count(myGold, 6)); 8. } 9. } 10. class Counter { 11. int count(int x, int y) { return x + y; } 12. }
What is the result?
D is correct.
The count()
method cannot be invoked from a static context.
A, B, C, and E are incorrect.