Page 1 of 1

About Question com.enthuware.ets.scjp.v6.2.42 :

Posted: Wed Nov 16, 2011 12:12 pm
by ETS User
class Assertion
{
public void assert(int k)
{
System.out.println("k is "+k);
}

public static void main(String[] args)
{
A a = new A();
a.assert(Integer.parseInt(args[0]); //4
}
}

That class will not compile, because class A is not known. Probably in main ther should be "Assertion a = new Assertion();"

Re: About Question com.enthuware.ets.scjp.v6.2.42 :

Posted: Fri Nov 25, 2011 9:11 am
by admin
You are right. A should actually be Assertion.
This has been fixed.

thank you for your feedback!