Purpose of goto in java -


this question has answer here:

i know goto keyword in java. also, wiki, can excerpt that, "it not used , has no function".

i wonder, why goto declared keyword if has no use , not used anywhere? did ever used goto in java program? there other keywords goto declared in java programming had metaphorically no use.

where use goto in our daily programming or when?

here bit of summary goto statements

usage:

they used jump out of block of statements in language, jmp instruction work @ assembly level.

goto's strictly prohibited make program difficult trace excessive jumps in code makes slow. imagine loop having goto inside it. not @ good.

java reserved keyword may involves native code inside jvm(that's bit of c/c++) code, may avoid ambiguity.

java provides break implementation of goto usage limited , should not used often.

here's example of break goto in java


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -