aspose file tools
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Statement not reachable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Reply Bookmark "Statement not reachable" Watch "Statement not reachable" New topic
Author

Statement not reachable

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
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 ]

cmbhatt
Nik Arora
Ranch Hand

Joined: Apr 26, 2007
Posts: 652
Hi Chandra,
Hey whats your doubt exactly
Abdul Mohsin
Ranch Hand

Joined: Apr 26, 2007
Posts: 111

Good question,
I am expecting answer from you only !!!


Regards, Abdul Mohsin
Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1707
Hi,

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

Very down to this html page
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Statement not reachable
 
Similar Threads
Unreachable statement
SCJP 6, 15.04.2010 12:30 CET
how the compiler decides about the unreachable stmt
plz exaplin me this Prog
Doubt on return type.