Given the code fragment:
class CallerThread implements Callable
String str;
public CallerThread(String s) {this.str=s;}
public String call() throws Exception {
return str.concat("Call");
}
}
and
public static void main (String[] args) throws InterruptedException, ExecutionException
{
ExecutorService es = Executors.newFixedThreadPool(4); //line n1
Future f1 = es.submit (newCallerThread("Call"));
String str = f1.get().toString();
System.out.println(str);
}
Which statement is true?
A. The program prints Call Call and terminates.Given the code fragment:
LocalDate valentinesDay =LocalDate.of(2015, Month.FEBRUARY, 14);
LocalDate nextYear = valentinesDay.plusYears(1);
nextYear.plusDays(15); //line n1
System.out.println(nextYear);
What is the result?
A. 2016-02-14Given the code fragment:
public void recDelete (String dirName) throws IOException {
File [ ] listOfFiles = new File (dirName) .listFiles();
if (listOfFiles ! = null andand listOfFiles.length >0) {
for (File aFile : listOfFiles) {
if (!aFile.isDirectory ()) {
if (aFile.getName ().endsWith (".class"))
aFile.delete ();
}
}
}
}
Assume that Projects contains subdirectories that contain .class files and is passed as an argument to the recDelete () method when it is invoked.
What is the result?
A. The method deletes all the .class files in the Projects directory and its subdirectories.Given the code fragment:
List
codes.forEach (c -> System.out.print(c + " "));
String fmt = codes.stream()
.filter (s-> s.contains ("PEG"))
.reduce((s, t) -> s + t).get();
System.out.println("\n" + fmt);
What is the result?
A. DOC MPEG JPEG MPEGJPEGGiven:
Item table
•
ID, INTEGER: PK
•
DESCRIP, VARCHAR(100)
•
PRICE, REAL
•
QUANTITY< INTEGER
And given the code fragment:
9.
try {
10.
Connection conn = DriveManager.getConnection(dbURL, username, password);
11.
String query = “Select * FROM Item WHERE ID = 110”;
12.
Statement stmt = conn.createStatement();
13.
ResultSet rs = stmt.executeQuery(query);
14.
while(rs.next()) {
15.
System.out.println(“ID: “ + rs.getInt(“Id”));
16.
System.out.println(“Description: “ + rs.getString(“Descrip”));
17.
System.out.println(“Price: “ + rs.getDouble(“Price”));
18.
System.out.println(Quantity: “ + rs.getInt(“Quantity”));
19.
}
20.
} catch (SQLException se) {
21.
System.out.println(“Error”);
22.
}
Assume that: The required database driver is configured in the classpath. The appropriate database is accessible with the dbURL, userName, and passWord exists. The SQL query is valid.
What is the result?
A. An exception is thrown at runtime.Given the content of /resourses/Message.properties:
welcome1="Good day!"
and given the code fragment:
Properties prop = new Properties ();
FileInputStream fis = new FileInputStream ("/resources/Message.properties");
prop.load(fis);
System.out.println(prop.getProperty("welcome1"));
System.out.println(prop.getProperty("welcome2", "Test"));//line n1
System.out.println(prop.getProperty("welcome3"));
What is the result?
A. Good day! Test followed by an Exception stack traceGiven:
Item table
?ID, INTEGER: PK ?DESCRIP, VARCHAR(100) ?PRICE, REAL ?QUANTIT<; INTEGER
And given the code fragment:
9.
try {
10.
Connection conn = DriveManager.getConnection(dbURL, username, password);
11.
String query = "Select * FROM Item WHERE ID = 110";
12.
Statement stmt = conn.createStatement();
13.
ResultSet rs = stmt.executeQuery(query);
14.
while(rs.next()) {
15.
System.out.println("ID: " + rs.getString(1));
16.
System.out.println("Description: " + rs.getString(2));
17.
System.out.println("Price: " + rs.getString(3));
18.
System.out.println(Quantity: " + rs.getString(4));
19.
}
20.
} catch (SQLException se) {
21.
System.out.println("Error");
22.
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with the dbURL, userName, and passWord exists.
The SQL query is valid.
What is the result?
A. An exception is thrown at runtime.Given the code fragment:
UnaryOperator
List
loanValues.stream()
.filter(lv -> lv >= 1500)
.map(lv -> uo1.apply(lv))
.forEach(s -> System.out.print(s + " "));
What is the result?
A. 4000.0Given records from the Player table:

and given the code fragment:
try {
Connection conn = DriverManager.getConnection(URL, username, password);
Statement st= conn.createStatement(
ResultSet.TYPE_SCROLL_SENSITIVE,
ResultSet.CONCUR_UPDATABLE);
st.execute ("SELECT * FROM Player");
st.setMaxRows(2);
ResultSet rs = st.getResultSet();
rs.absolute(3);
while (rs.next ()) {
System.out.println(rs.getInt(1) + " " + rs.getString(2));
}
} catch (SQLException ex) {
System.out.print("SQLException is thrown.");
}
Assume that:
The required database driver is configured in the classpath.
The appropriate database is accessible with URL, username, and password.
The SQL query is valid.
What is the result?
A. 2 Jack 3 SamGiven the code fragment:

What is the result?
A. A compilation error occurs.Nowadays, the certification exams become more and more important and required by more and more enterprises when applying for a job. But how to prepare for the exam effectively? How to prepare for the exam in a short time with less efforts? How to get a ideal result and how to find the most reliable resources? Here on Vcedump.com, you will find all the answers. Vcedump.com provide not only Oracle exam questions, answers and explanations but also complete assistance on your exam preparation and certification application. If you are confused on your 1Z0-809 exam preparations and Oracle certification application, do not hesitate to visit our Vcedump.com to find your solutions here.