日期:2014-05-20 浏览次数:20827 次
import javax.swing.*;
import java.util.*;
import java.math.*;
import java.util.Date;
public class CloneTest extends Object
{
    public static void main(String[] args)
    {
    }
}
class Employee implements Comparable<Employee> //在Eclipse中,除了 return 0 那行没提示错误,其他都有错
{
    int compareTo(Employee)
    {
        return 0;
    }
}
 int compareTo(Employee)
    {
        return 0;
    }
------解决方案--------------------
访问权限只能升不能降
------解决方案--------------------
    class Employee implements Comparable<Employee> //在Eclipse中,除了 return 0 那行没提示错误,其他都有错
    {
        public int compareTo(Employee e)  //1. 此为继承方法,必须为public,2.参数必须有一个名字
        {
            return 0;
        }
    }