Question:

Which of the following is true?

public class A implements Comparable {

  final int a;

  A(final int a) {
    this.a = a;
  }

  public int compareTo(A that) {
    return this.a - that.a;
  }

  public static void main(String[] args) {
    A a1 = new A(1);
    A a2 = new A(2);
    System.out.println(a1 > a2);
  }

}

 

Answers:


Keywords:

© 2017 QuizBucket.org