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

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
ETS User

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

Post 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'".

admin
Site Admin
Posts: 10036
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

You are right. This has been fixed. Thanks a lot for your feedback!
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 24 guests