when the code called unreachable code ?
and why the compiler doesn't reach to it?
by chance , during writing code to program
I write
while(true){
some code
}
any code here called unreachable code
why??????????????????/
unreachable code in java
Started by eman ahmed, Jul 21 2010 03:40 PM
3 replies to this topic
#1
Posted 21 July 2010 - 03:40 PM
|
|
|
#2
Posted 21 July 2010 - 03:49 PM
Because the loop will never end. The compiler reaches it, but execution will not.
#3
Posted 22 July 2010 - 03:05 AM
put a break in your loop or change the true to a variable that can be changed within the loop.
#4
Posted 22 July 2010 - 12:22 PM
thanks alot , I got it.


Sign In
Create Account


Back to top









