标题:错在哪里!!!!!!!
取消只看楼主
weibingyi
Rank: 1
等 级:新手上路
帖 子:3
专家分:0
注 册:2011-4-15
结帖率:50%
已结贴  问题点数:10 回复次数:0 
错在哪里!!!!!!!
   import *;
import java.awt.*;
import java.awt.event.*;
public class Student
{
   
       public static void main(String args[])
       {
           Stu1 a=new Stu1(29065001L,"一","小明 ","男",22);

          System.out.println(a.toString());
       }
}

 class Stu1
{
                  
           long number;
           String classname;
           String name;
           String sex;
           int age;
        

public String toString()
{
   String s="学号:  "+number+"\n班级名: "+classname+"\n名字:  "+name+"\n性别:  "+sex+"\n年龄:  "+age;
   return s;
}     

}   
   
搜索更多相关主题的帖子: long 
2011-05-28 20:56



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-341259-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.323473 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved