• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Statement not reachable

 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Case #1


Case #2


Case #4


Case #5



Case #6



I have doubt specially regarding Case #1 and Case #6

Why is in first case, the statement is not reachable even if the if statement is certainly to execute because of if(true), I compare this with
while(true){}; because any statement that comes after that, is not reachable.

Can anybody please give me idea of that!

Thanks,
[ April 30, 2007: Message edited by: Chandra Bhatt ]
 
Nik Arora
Ranch Hand
Posts: 652
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Chandra,
Hey whats your doubt exactly
 
Abdul Mohsin
Ranch Hand
Posts: 111
Java Linux Netbeans IDE
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Good question,
I am expecting answer from you only !!!
 
Chandra Bhatt
Ranch Hand
Posts: 1710
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have found very good explanation to all the given issues, in JLS

Very down to this html page
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic