• Post Reply Bookmark Topic Watch Topic
  • New Topic

difference between unreachable and hidden line of code  RSS feed

 
s sivaraman
Ranch Hand
Posts: 59
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

can somebody tell me what is the difference between unreachable and hidden(i reckon it comes in inheritance) line of code?

thank you
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unreachable is code which can't be run due to some condition is always true. For an example if an infinite loop is running then no code will
be run after that.. Like below




Hidden term is used in case of static method/variables. If you have declared some methods/variables as static in a class and in sub class of that
class you also defined the same method/variable than super class methods/variables will be hidden.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!