Question: What is wrong with the following code? public class Foo { private int num; public Foo(int a1) { num = a1; } } public class
What is wrong with the following code?
public class Foo
{
private int num;
public Foo(int a1)
{
num = a1;
}
}
public class FooTest
{
Foo foo = new Foo(3, 4);
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
