wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Clarification on local variable scope. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Clarification on local variable scope." Watch "Clarification on local variable scope." New topic
Author

Clarification on local variable scope.

Eric Larsen
Ranch Hand

Joined: Mar 28, 2009
Posts: 35
Just for some clarification on the scope of local variables:




Will this compile?
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
Do you think it will compile?


Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
Henry Wong
author
Sheriff

Joined: Sep 28, 2004
Posts: 18123
    
  39

Will this compile?


From your question, I think you already know that it won't -- and you know why too.

Why don't you just take a minute and actually compile it?

Henry


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
Eric Larsen
Ranch Hand

Joined: Mar 28, 2009
Posts: 35
Thanks. I would do it myself, but I'm over at my Grandma's house. I'm using her computer and I didn't want to take the time to install the jdk on it. I have my Head First Java with me though and am reading through ch9.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Clarification on local variable scope.
 
Similar Threads
same variable name for instance and local variable
Question Bank ID : 41
Why doesn't named classes classes doesn't insist on final parameter variable?
using temporary variabel
Variable with Same Name