About Question enthuware.ocajp.i.v7.2.1298 :

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 enthuware.ocajp.i.v7.2.1298 :

Post by ETS User »

Consider the following answer:

volatile int k;

This answer is only valid for instance variables (data members). It is not valid for local variables as (1) "there is never any need to mark
local variables volatile." -- (http://www.codemiles.com/java/java-vola ... t1406.html) and (2) NetBeans 7.3 Beta provides an error when volatile is used locally, "illegal start of expression".

Recommendation: reword so the test candidate will not consider this statement with local variables.

-- Robert

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

Re: About Question enthuware.ocajp.i.v7.2.1298 :

Post by admin »

The problem statement has been updated to specify that the declarations are within a class to avoid this confusion.

thank you for your feedback!

Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests