Hello everyone.
I'm in need of some help on how the compareTo method works. First I'll give you some background about it. This program was written in eclipse and it's a homework assignment.
I'm trying to compare two Time objects and see which one is greater.
here's the code
import junit.framework.Testcase
public class Time implements Comparable<Time>
public void compareTest()
{
Time blastTime = new Time(12, 45, 43);
Time o = new Time(10, 32,22);
blastTime.compareTo(o);
}
Now this is a JUnit Test case and for some reason it refuses to test it.
Any advice that would lead into the right direction, would be most appreciated.
Thank you