About Question enthuware.ocpjp.v11.2.3655 :

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
syzygy
Posts: 3
Joined: Wed Mar 31, 2021 2:56 pm
Contact:

About Question enthuware.ocpjp.v11.2.3655 :

Post by syzygy »

It should be noted, that the val-- after the inner class is also illegal, so if you just change the inner class to

Code: Select all

public int reduce(int mval) {
    return mval - val;
}
it still fails to compile

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

Re: About Question enthuware.ocpjp.v11.2.3655 :

Post by admin »

Actually, val-- after the inner class is not illegal. Using val inside the inner class if there is val-- after the innerclass is illegal (because val wouldn't remain effectively final if you do val-- after the inner class).
Noted.
thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests