package hello.eava;
public class SeqListTest2
{
private long number;//学号
private String name;//学生名字
private String sex;//性别
private int age;//年龄
SeqListTest2(long number,String name,String sex,int age)//构造函数
{
this.number = number;
this.name = name;
this.sex = sex;
this.age = age;
}
public long getNumber()
{
return number;
}
public String getName()
{
return name;
}
public String getSex()
{
return sex;
}
public int getAge()
{
return age;
}
public static void main(String[] args)
{
SeqListTest2 s = new SeqListTest2(2000001, "张三 ", "男 ",20);
SeqListTest2 s1 = new SeqListTest2(2000001, "李四 ", "男 ",21);
SeqListTest2 s2 = new SeqListTest2(2000001, "王五 ", "男 ",22);
/*try
{
for (int i = 0;i <n ;i++ )
{
S.insert(i,student[i]);//........
}
for (int i = 0;i <S.size ;i++ )
{
Student st = (Student)seqList.getData(i);//...........
System.out.println(st.getNumber()+ " "+st.getName()
+ " "+st.getSex()+ " "+st.getAge());//.........
}
}
catch (Exception e)
{
System.out.println(e.getMessage());
}
*/
System.out.println(s.toString());
System.out.println(s1.toString());
System.out.println(s2.toString());
}
}
运行的时候出现以下;
Exception in thread "main " java.lang.NoClassDefFoundError: SeqListTest2 (wrong n
ame: hello/eava/SeqListTest2)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
4)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)