Can an interface implement another interface?
Is the following a suitable implementation of the Comparable interface?
public class Double2 implements Comparable
{
private double value;
public Double2(double theValue)
value = theValue;
}
public int compareTo(Object other)
return -1;
public double doubleValue()
return value;
You can think of the underlying “comes before” relationship as saying that for
any objects d1 and d2, d1 comes before d2.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here