+ 1
Why we don't have goto in java?
I had heard goto is very bad and you shouldn't use goto.I don't understand why?? I had used goto in my small many C and C++ programs. is it bad to use goto?? and why java don't have goto ??
2 Antworten
+ 2
James Gosling said that it isn't in Java because it's unnecessary, and usually it can be replaced with other statements which are more readable (break or continue).
In my and some other's opinion, it can be the most readable way sometimes, but I'm not someone who disigns languages. :D
There are several different opinions about this, you can read about these on Wikipedia: https://en.wikipedia.org/wiki/Goto
+ 1
I think Java has more advanced features then "goto"
and that's true