Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Clarification on local variable scope.

 
Eric Larsen
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just for some clarification on the scope of local variables:




Will this compile?
 
Garrett Rowe
Ranch Hand
Posts: 1296
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do you think it will compile?
 
Henry Wong
author
Marshal
Pie
Posts: 21114
78
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Eric Larsen
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic