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

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.182 :

Post by ETS User »

Is there a bug ? Option new C() is shown as correct. This does not compile. It is missing the ;

Which of the given options if put at //1 will correctly instantiate objects of various classes defined in the following code?


public class TestClass
{
public class A
{
}
public static class B
{
}
public static void main(String args[])
{
class C
{
}
new C()
}
}

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

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

Post by admin »

You are right. There should be a semi colon. This has now been fixed.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests