我是编程新手,我想知道在实例化对象时我出错了.以下是代码:
public class Testing{
private int Sample(int c)
{
int a = 1;
int b = 2;
c = a + b;
return c;
}
public static void main(String []args)
{
Sample myTest = new Sample();
System.out.println(c);
}
}
Run Code Online (Sandbox Code Playgroud)