Oracle Java SE 7 Programmer I (1Z0-803日本語版) - 1Z0-803日本語 模擬練習





正解: B

int b = 3;
if ( !(b > 3)) {
System.out.println("square ");
}{
System.out.println("circle ");
}
System.out.println("...");

正解: C



正解: D

1.ArrayList<Integer> list = new ArrayList<>(1);
2.list.add(1001);
3.list.add(1002);
4.System.out.println(list.get(list.size()));

正解: B
Given:




正解: B



正解: B

正解: C,D
TION NO: 77

public class Main {
public static void main(String[] args) {
try {
doSomething();
}
catch (SpecialException e) {
System.out.println(e);
}}
static void doSomething() {
int [] ages = new int[4];
ages[4] = 17;
doSomethingElse();
}
static void doSomethingElse() {
throw new SpecialException("Thrown at end of doSomething() method"); }
}


public class Main {
public static void main(String[] args) {
try {
doSomething();
}
catch (SpecialException e) {
System.out.println(e);
}}
static void doSomething() {
int [] ages = new int[4];
ages[4] = 17;
doSomethingElse();
}
static void doSomethingElse() {
throw new SpecialException("Thrown at end of doSomething() method"); }
}

正解: B



正解: C

for (int ii = 0; ii < 3;ii++) {
int count = 0;
for (int jj = 3; jj > 0; jj--) {
if (ii == jj) {
++count;
break;
} }
System.out.print(count);
continue;
}

正解: B
public class ForTest {
public static void main(String[] args) { int[] arrar = {1,2,3}; for ( foo ) { } } }

public static void main(String[] args) { int[] arrar = {1,2,3}; for ( foo ) { } } }

正解: A,B,E
Given: Given:
public class SuperTest {
public static void main(String[] args) { statement1 statement2 statement3
}
}
class Shape {
public Shape() {
System.out.println("Shape: constructor");
}
public void foo() {
System.out.println("Shape: foo");
}
}
class Square extends Shape {
public Square() {
super();
}
public Square(String label) {
System.out.println("Square: constructor");
}
public void foo() {
super.foo();
}
public void foo(String label) {
System.out.println("Square: foo");
}
}
}
}

Shape: constructor
Square: foo
Shape: foo
public class SuperTest {
public static void main(String[] args) { statement1 statement2 statement3
}
}
class Shape {
public Shape() {
System.out.println("Shape: constructor");
}
public void foo() {
System.out.println("Shape: foo");
}
}
class Square extends Shape {
public Square() {
super();
}
public Square(String label) {
System.out.println("Square: constructor");
}
public void foo() {
super.foo();
}
public void foo(String label) {
System.out.println("Square: foo");
}
}
}
}

Shape: constructor
Square: foo
Shape: foo
正解: C



正解: D,F,G



正解: C



正解: A