这应该是java中最基本得实例代码,定义一个类对象,然后通过类对象调用类中得方法:
可以的
caculater xx=new caculater();int a,b;赋值下sout(xx.add(a,b));然后main方法是public static void main