1z0-809試験無料問題集「Oracle Java SE 8 Programmer II 認定」

Given that course.txt is accessible and contains:
Course : : Java
and given the code fragment:
public static void main (String[ ] args) {
int i;
char c;
try (FileInputStream fis = new FileInputStream ("course.txt");
InputStreamReader isr = new InputStreamReader(fis);) {
while (isr.ready()) { //line n1
isr.skip(2);
i = isr.read ();
c = (char) i;
System.out.print(c);
}
} catch (Exception e) {
e.printStackTrace();
}
}
What is the result?

Given that data.txt and alldata.txt are accessible, and the code fragment:

What is required at line n1 to enable the code to overwrite alldata.txt with data.txt?

Given the code fragment:
List<String> listVal = Arrays.asList("Joe", "Paul", "Alice", "Tom");
System.out.println (
// line n1
);
Which code fragment, when inserted at line n1, enables the code to print the count of string elements whose length is greater than three?

You want to create a singleton class by using the Singleton design pattern.
Which two statements enforce the singleton nature of the design? (Choose two.)

Given:

and the code fragment:

What is the result?

Given:

and the code fragment:

Which definition of the ColorSorter class sorts the blocks list?

Given the records from the Employee table:

and given the code fragment:
try {
Connection conn = DriverManager.getConnection (URL, userName, passWord); Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); st.execute("SELECT*FROM Employee"); ResultSet rs = st.getResultSet(); while (rs.next()) { if (rs.getInt(1) ==112) { rs.updateString(2, "Jack");
}
}
rs.absolute(2);
System.out.println(rs.getInt(1) + " " + rs.getString(2));
} catch (SQLException ex) {
System.out.println("Exception is raised");
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database accessible with the URL, userName, and passWord exists.
What is the result?

Given:
public interface Moveable<Integer> {
public default void walk (Integer distance) {System.out.println("Walking");) public void run(Integer distance);
}
Which statement is true?

Given:
class FuelNotAvailException extends Exception { }
class Vehicle {
void ride() throws FuelNotAvailException {//line n1
System.out.println("Happy Journey!");
}
}
class SolarVehicle extends Vehicle {
public void ride () throws FuelNotAvailException {//line n2
super ride ();
}
}
and the code fragment:
public static void main (String[] args) throws Exception {
Vehicle v = new SolarVehicle ();
v.ride();
}
Which modification enables the code fragment to print Happy Journey!?

Given the code fragment:

What is the result?

解説: (GoShiken メンバーにのみ表示されます)