Question 1

Given the code fragment:

What is the result?
  • Question 2

    Given:

    And given the commands:
    javac Test . java
    java Test
    What is the result?
  • Question 3

    Given the code fragment:
    List<String> codes = Arrays.asList ("DOC", "MPEG", "JPEG");
    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?
  • Question 4

    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 5

    Given:

    and the code fragment:

    What is the result?