Oracle Java SE 8 Programmer I - 1z0-808 模擬練習

Given the code in a file Traveler.java:

And the commands:
Javac Traveler.java
Java Traveler Java Duke
What is the result?

正解: B
Given the code fragment:

Test.java:

Which is the result?

正解: D
Given the code fragment:
public class ForTest {
public static void main(String[] args) {
int[] array = {1, 2, 3};
for ( foo ) {
}
}
Which three code fragments, when replaced individually for foo, enables the program to compile?

正解: A,C,E
Given:

What is the result?

正解: A
Given the code fragment:

You want the code to print:
Sold: 5 items.
Stock in Hand: 5
Purchased: 5 items.
Stock in Hand: 10?
Which action enables the code to print this?

正解: D
Which three statements are true about the structure of a Java class?

正解: C,E,F
Given:

Which is true?

正解: B
解説: (PassTest メンバーにのみ表示されます)
Given the code fragment:

What is the result?

正解: A