1z0-809 Exam Question 106

Given the following code for a planet object:

And the following main method:

What is the output?
  • 1z0-809 Exam Question 107

    Given the code fragment:

    What is the result?
  • 1z0-809 Exam Question 108

    Given:
    public class Foo<K, V> {
    private K key;
    private V value;
    public Foo (K key, V value) (this.key = key; this value = value;)
    public static <T> Foo<T, T> twice (T value) (return new Foo<T, T> (value, value); )
    public K getKey () (return key;)
    public V getValue () (return value;)
    }
    Which option fails?
  • 1z0-809 Exam Question 109

    Given:

    and the code fragment:

    What is the result?
  • 1z0-809 Exam Question 110

    Given:
    public class Counter {
    public static void main (String[ ] args) {
    int a = 10;
    int b = -1;
    assert (b >=1) : "Invalid Denominator";
    int = a / b;
    System.out.println (c);
    }
    }
    What is the result of running the code with the -ea option?