Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Instance variables/local variables

 
Rakesh Ravindra
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

can anyone help me in understanding the compiler rule of initializing the local variables before using it.
What was the logic behind implementing this rule? why can't the compiler assumes default values as it works for instance variables.

Excuse me if this is already answered question bcoz i am bit lazy to search previous posts.

Thanks
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64683
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
"rrr_java", please check your private messages for an important administrative matter.
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rrr_java:
Excuse me if this is already answered question bcoz i am bit lazy to search previous posts.


I'm a bit lazy myself and so find it easier to just post this link than to tell you the answer.
 
Ernest Friedman-Hill
author and iconoclast
Marshal
Pie
Posts: 24208
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Our naming policy requires two names, and the second one can not be an initial.
 
Rakesh Ravindra
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


Thanks for posting the link!

-- changing my name again.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic