| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 743 人关注过本帖
标题:[讨论]程序赏析1
取消只看楼主 加入收藏
jin_geping
Rank: 1
等 级:新手上路
帖 子:61
专家分:0
注 册:2006-7-12
收藏
 问题点数:0 回复次数:0 
[讨论]程序赏析1
class point{
private int x,y;
public void setpoint(int a,int b)
{
x=a;
y=b;
}
public int getx(){return x;}
public int gety(){return y;}
public String toString()
{return"["+this.getx()+","+this.gety()+"]";}
public static void main(String args[])
{
int i,j;
i=Integer.parseInt(args[0]);
j=Integer.parseInt(args[1]);
point dot=new point();
dot.setpoint(i,j);
System.out.println(dot.toString());

}
}



如此程序居然报错!什么世道啊!请高手指点--
java.lang.ArrayIndexOutOfBoundsException: 0
at point.main(point.java:15)
Exception in thread "main"

搜索更多相关主题的帖子: 赏析 
2006-08-19 15:29
快速回复:[讨论]程序赏析1
数据加载中...
 
   



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

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