You have been asked to create a ResourceBundle which uses a properties file to localize an application. Which code example specifies valid keys of menu1 and menu2 with values of File Menu and View Menu?
Correct Answer:D
Given the code fragment:
What is the result?
Correct Answer:D
For which three objects must a vendor provide implementations in its JDBC driver? (Choose three.)
Correct Answer:CDE
Database vendors support JDBC through the JDBC driver interface or through the ODBC connection. Each driver must provide implementations of java.sql.Connection, java.sql.Statement, java.sql.PreparedStatement, java.sql.CallableStatement, and java.sql.Re sultSet. They must also implement the java.sql.Driver interface for use by the generic java.sql.DriverManager interface.
Given the code fragment:
public class FileThread implements Runnable { String fName;
public FileThread(String fName) { this.fName = fName; } public void run () System.out.println(fName);}
public static void main (String[] args) throws IOException, InterruptedException {
ExecutorService executor = Executors.newCachedThreadPool(); Stream
executor.execute(new FileThread(line.getFileName().toString ())); //
line n1
});
executor.shutdown(); executor.awaitTermination(5, TimeUnit.DAYS); // line n2
}
}
The Java Projects directory exists and contains a list of files. What is the result?
Correct Answer:B
Given:
and the code fragment:
Which definition of the ColorSorter class sorts the blocks list?
Correct Answer:B