+ 1
Can i declare my own statement like goto in java
I really use goto a lot in c/c++ . but it is not available in java.so is there any way of declaring my own user define statement like user define functions?? if yes then how??
1 Réponse
+ 7
You can't. gotos do exist in Java but they do 100% nothing. Try writing goto in code playground and the color would be purple which means its a statement. But it will cause an error since it does absolutely nothing. Just like the const keyword. btw goto leads to spaghetti code.