About Question enthuware.jwpv6.2.928 :

Moderator: admin

Post Reply
viva

About Question enthuware.jwpv6.2.928 :

Post by viva »

About option 1...It is considered wrong...but I think it is possible to define "method local inner class" and put the method there...

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

Re: About Question enthuware.jwpv6.2.928 :

Post by admin »

I see what you mean. Technically, you are right but that will make the question too complicated for the exam. I think it is good that you pointed it out here but I am not sure if it is a good idea to make it a right option.

May be the option itself can be removed?

viva

Re: About Question enthuware.jwpv6.2.928 :

Post by viva »

Yes, I agree it might become "too scjp type of question" :)))))

So maybe what you suggest is a proper way to solve this :)

JoeAllen
Posts: 13
Joined: Thu Jul 11, 2013 11:22 pm
Contact:

Re: About Question enthuware.jwpv6.2.928 :

Post by JoeAllen »

The correct answers:
2.<%! public void m1() { ... } %>
4.<%! public void m1() { ... }; %>

The difference is one has ";" and the other does not. How can both be right?

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

Re: About Question enthuware.jwpv6.2.928 :

Post by admin »

Because semi colon is redundant here.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest