Thread: GoTo
View Single Post
Old 01-30-2005, 01:43 AM   #1 (permalink)
freesoft_2000
Code Monkey
 
Join Date: Oct 2004
Posts: 51
freesoft_2000 is on a distinguished road
Question GoTo

Hi everyone,

I need to use something in java that is similar to the C language goto statement.

This is what i have in a function

Code:
public int ret()
{

if
{
//something
//something

//This is the part where i need to jump to the end of the
//function and not exit the function
}

//This is the part i need to jump to

//some more code
//some more code
}
Is there a way in which the above problem can be got around. Usually in the C language i would use the goto statement. I can't use a labeled break here as there is no loop in my program.

I hope someone can help me this problem

Thank You

Yours Sincerely

Richard West
freesoft_2000 is offline   Reply With Quote