Java开发网 Java开发网
注册 | 登录 | 帮助 | 搜索 | 排行榜 | 发帖统计  

您没有登录

» Java开发网 » Java SE 综合讨论区  

按打印兼容模式打印这个话题 打印话题    把这个话题寄给朋友 寄给朋友    该主题的所有更新都将Email到你的邮箱 订阅主题
flat modethreaded modego to previous topicgo to next topicgo to back
作者 请各位高手帮忙看看这段代码怎么了? (illegal character: \12288)
cjy





发贴: 7
积分: 0
于 2004-08-31 16:09 user profilesend a private message to usersend email to cjysearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
各位高手,我才开始学java。编译这段程序时报错,但不知错在哪里?望各位能帮帮。
class employee
{
protected String name;
protected String street;
protected String city;
protected String prov;
protected String postcode;
protected int no;
employee(String pname,String pstreet,String pcity,String pprov,String ppostcode,int pno)
{
name=pname; street=pstreet;city=pcity;prov=pprov;postcode=ppostcode;no=pno;
}
void changeName(String newname)
{
name=newname;
}
public void display()
{
System.out.println("输出记录"+no);
System.out.println("  姓名"+name);
System.out.println("街道地址"+street);
System.out.println("   市"+city);
System.out.println(" 省"+prov);
System.out.println("邮政编码"+postcode);
}
}
public class TestEm{
public static void main(String args[]){
employee em1=new employee("王军","中山路120号","长沙市","湖南省","410600",1);
employee em2=new employee("段君","湖南路234号","南京市","江苏省","214000",2);
em1.display();
em2.display();
}
  }
编译时报错为:
\TestEm\TestEm.java:34: illegal character: \12288
  }
^
\TestEm\TestEm.java:34: illegal character: \12288
  }
^
TestEm\TestEm.java:34: <identifier> expected
  }
^
先谢过各位啦。


why edited on 2004-08-31 19:46


我有一点感想和初学者们同享(原创)

话题树型展开
人气 标题 作者 字数 发贴时间
3202 请各位高手帮忙看看这段代码怎么了? (illegal character: \12288) cjy 1275 2004-08-31 16:09
2497 Re:请各位高手帮忙看看这段代码怎么了? xiaopa 20 2004-08-31 16:14
2527 Re:请各位高手帮忙看看这段代码怎么了? forrest_gump 42 2004-08-31 16:23
2551 Re:请各位高手帮忙看看这段代码怎么了? cjy 42 2004-08-31 16:45

flat modethreaded modego to previous topicgo to next topicgo to back
  已读帖子
  新的帖子
  被删除的帖子
Jump to the top of page

   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923