Page 1 of 1

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

Posted: Tue Feb 01, 2011 4:26 pm
by ETS User
Given the following class, which statements can be inserted at line 1 without causing the code to fail compilation?

Code: Select all

public class TestClass
{
   int a;
   int b = 0;
   static int c;
   public void m()
   {
      int d;
      int e = 0;
      // Line 1
   }
}
The third answer option is "c++;" with the explanation:
Here 'a' is a class (or static) variable of type int so it will be given a default value of Zero.
I believe you mean to say "'c' is a class (or static) variable", not "'a'".

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

Posted: Tue Feb 01, 2011 6:54 pm
by admin
You are right. This has been fixed. Thanks a lot for your feedback!