有很多最基础的东西你都不明白
我17楼的程序
----------------解决方案--------------------------------------------------------
真是强中还有强中手,一山更比一山高。。。
----------------解决方案--------------------------------------------------------
以下是引用韩峰在2006-7-29 17:52:31的发言:
上面那个的有问题
public class Test
{
private int a;
public Test(int a)
{
this.a=a;
abs(this.a);
}
public static void abs(int a)
{
System.out.println(Math.abs(a)); //这个为什么不写在最下面呢
}
public static void main(String args[])
{
new Test(-1);
}
}
上面那个的有问题
public class Test
{
private int a;
public Test(int a)
{
this.a=a;
abs(this.a);
}
public static void abs(int a)
{
System.out.println(Math.abs(a)); //这个为什么不写在最下面呢
}
public static void main(String args[])
{
new Test(-1);
}
}
感觉这个程序写得好复杂 可以简单一点的
我现在正在从头开始看书 刚开始看就有些不明白 所以就在论坛里面想问个清楚
太感谢你了 也感谢论坛里帮过我的朋友们
[此贴子已经被作者于2006-7-29 19:21:21编辑过]
----------------解决方案--------------------------------------------------------
public class Test {
public static void main(String [] args){
System.out.println(Math.abs(-1));
}
}
----------------解决方案--------------------------------------------------------
~` 大致上明白了 !
----------------解决方案--------------------------------------------------------