Question 76

Given:

and the code fragment:

Which two code fragments, when inserted at line n1 independently, enable the code to print TruckCarBike?
  • Question 77

    Given:
    Class A { }
    Class B { }
    Interface X { }
    Interface Y { }
    Which two definitions of class C are valid?
  • Question 78

    Given:

    and the code fragment:

    Which modification enables the code fragment to print Speaker?
  • Question 79

    Given the code fragment:
    public class Foo {
    public static void main (String [ ] args) {
    Map<Integer, String> unsortMap = new HashMap< > ( );
    unsortMap.put (10, "z");
    unsortMap.put (5, "b");
    unsortMap.put (1, "d");
    unsortMap.put (7, "e");
    unsortMap.put (50, "j");
    Map<Integer, String> treeMap = new TreeMap <Integer, String> (new
    Comparator<Integer> ( ) {
    @Override public int compare (Integer o1, Integer o2) {return o2.compareTo
    (o1); } } );
    treeMap.putAll (unsortMap);
    for (Map.Entry<Integer, String> entry : treeMap.entrySet () ) {
    System.out.print (entry.getValue () + " ");
    }
    }
    }
    What is the result?
  • Question 80

    Which action can be used to load a database driver by using JDBC3.0?