Page 1 of 1

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

Posted: Mon Oct 03, 2011 2:49 pm
by ETS User
Hi,
It looks like in this snippet(first option in the question) there is a small error-missing "new" before AssertionError():

void assertTest(Object obj)
{
assert obj != null : throw AssertionError();
}


maybe it should be:

void assertTest(Object obj)
{
assert obj != null : throw new AssertionError();
}

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

Posted: Sat Oct 08, 2011 8:06 am
by admin
You are right. This has now been fixed. It is still a wrong option though for the reason mentioned.

thanks for your feedback!