This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Statement not reachable Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Statement not reachable" Watch "Statement not reachable" New topic

Statement not reachable

Chandra Bhatt
Ranch Hand

Joined: Feb 28, 2007
Posts: 1710
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!

[ April 30, 2007: Message edited by: Chandra Bhatt ]

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: 1710

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

Very down to this html page
Have you checked out Aspose?
subject: Statement not reachable
It's not a secret anymore!