|
-
Please Help
Why i am getting error that my class is not Seriazable?
import java.util.*;
class Comp implements Comparator,Serializable {
private int count = 0;
static public int MAXSETS = 1;
private int a[] = new int[MAXSETS];
private int b[] = new int[MAXSETS];
public int compare(Object a,Object b)
{
Integer a1=(Integer) a;
Integer b1=(Integer) b;
return b1.compareTo(a1);
}
public String toString(){
String str=" ";
for(int i=0;i < count;i++){
str = str+" "+a[i];
// str = str+" "+number[i];
System.out.println("gg"+ str);
}
return str;
}
}
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks