The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
November 2001

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

The compiler answer:

Posted by Eduardo on November 06, 2001 at 9:08 PM

public class LongComparator implements Comparator{
public int compare(Object o1, Object o2) {
long ss1 = Long.parseLong(o1.toString());
long ss2 = Long.parseLong(o2.toString());
return ss1.compareTo(ss2);
}
} //
C:\jdk1.3.1_01\Greenhouse\GreenhouseControls.java:186: long cannot be dereferenced
return ss1.compareTo(ss2);
^
1 error





Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us