fxbianxiu
发贴: 6
积分: 0
|
于 2005-01-19 20:52
class box{ int suma; int sum(int a,int b,int c ){ suma=a+b+c; return suma; } }
class demo{ public static void main(String argc[] ) { System.out.println("Please input : "); box box1=new box(); System.out.println("out:"+box1.sum(10,20,30)); } }
我写的以上代码为什么在 NetBeans 出现如下错误呢?让我百思不得解,请高手帮忙!
class box{ int suma; int sum(int a,int b,int c ){ suma=a+b+c; return suma; } }
class demo{ public static void main(String argc[] ) { System.out.println("Please input : "); box box1=new box(); System.out.println("out:"+box1.sum(10,20,30)); } }
|