1Z1-804 試験問題を無料オンラインアクセス
| 試験コード: | 1Z1-804 |
| 試験名称: | Java SE 7 Programmer II Exam |
| 認定資格: | Oracle |
| 無料問題数: | 150 |
| 更新日: | 2025-12-07 |
Given the code fragment: Which two try statements, when inserted at line ***, enable you to print files with the extensions.java, .htm, and .jar.
Given:
public class Main {
public static void main(String... ag) {
Vehicle v = new SportsCar();
System.out.println(v.goes());
Tank t = (Tank) v;
System.out.println(t);
}
}
class Vehicle {
public String goes() {
return "goes ";
};
}
class SportsCar extends Vehicle {
public String goes() {
return "fast ";
};
}
class Tank extends Vehicle {
public String goes() {
return "slow ";
}; }
What is the result?
