Oracle
1Z0-819 · Question #194
1Z0-819 Question #194: Real Exam Question with Answer & Explanation
Sign in or unlock 1Z0-819 to reveal the answer and full explanation for question #194. The question stem and answer options stay visible for context.
Question
Given: ```java
public class GameObject {
public GameObject() {}
public GameObject(int x, int y) {
System.out.println("move(" + x + "," + y + ")");
}
public Integer move(Integer x, Integer y) {
return new Integer(x * y);
}
}
public class Avatar extends GameObject {
public Avatar() {
System.out.println("Avatar");
}
public Avatar(int x, int y) {
super(x, y);
}
public Integer move(Number x, Number y) {
return super.move(x.intValue(), y.intValue());
}
public static void main(String... args) {
GameObject object = new GameObject(10, 10);
Character character = new Character();
object.move(10, 10);
character.move(10.0, 10.0);
character.move(10, 10);
}
}
What is the result?
Options
- Amove(10,10) Avatar 100
- BMove GameObject Move GameObject Move GameObject
- CMove GameObject Move GameObject Move GameObject
- DMove GameObject Move GameObject Move GameObject
Unlock 1Z0-819 to see the answer
You've previewed enough free 1Z0-819 questions. Unlock 1Z0-819 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.