Question 161

For which three objects must a vendor provide implementations in its JDBC driver? (Choose three.)
  • Question 162

    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?
  • Question 163

    Given the code fragments:
    class Caller implements Callable<String> {
    String str;
    public Caller (String s) {this.str=s;}
    public String call()throws Exception { return str.concat ("Caller");}
    }
    class Runner implements Runnable {
    String str;
    public Runner (String s) {this.str=s;}
    public void run () { System.out.println (str.concat ("Runner"));}
    }
    and
    public static void main (String[] args) InterruptedException, ExecutionException
    {
    ExecutorService es = Executors.newFixedThreadPool(2);
    Future f1 = es.submit (new Caller ("Call"));
    Future f2 = es.submit (new Runner ("Run"));
    String str1 = (String) f1.get();
    String str2 = (String) f2.get(); //line n1
    System.out.println(str1+ ":" + str2);
    }
    What is the result?
  • Question 164

    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?
  • Question 165

    Given the code fragment:

    What is the result?