Two Laptop Bag*
The moose likes Threads and Synchronization and the fly likes Why not legal java ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Threads and Synchronization
Bookmark "Why not legal java ?" Watch "Why not legal java ?" New topic
Author

Why not legal java ?

Don Kiddick
Ranch Hand

Joined: Dec 12, 2002
Posts: 580

?
Joe Ess
Bartender

Joined: Oct 29, 2001
Posts: 8836
    
    7

Identifiers are only valid within the scope they are declared. You declared i within the synchronized block, it is not accessible outside of the block. There's a detailed explanation of scope in the Java Tutorial


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Why not legal java ?
 
Similar Threads
for loop question
assignments and + operator
lockCookie
Access a variable
JSP called from filter not finding JavaScript file