Given:
1. public class Frodo extends Hobbit {
2. public static void main(String[] args) {
3. Short myGold = 7;
4. System.out.println(countGold(myGold, 6));
5. }
6. }
7. class Hobbit {
8. int countGold(int x, int y) { return x + y; }
9. }
What is the result?
发布于 2021-02-15 03:24:30
【单选题】 A 13 B Compilation fails due to multiple errors C Compilation fails due to an error on line 1 D Compilation fails due to an error on line 4