Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

GoTo  RSS feed

 
Richard West
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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



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
 
Jeremy Wilson
Ranch Hand
Posts: 166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
First time I have seen a request for goto information. Not very object oriented. I would put the code that needs to be jumped to in another function. If that is not possible I would redesign my object model.
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
before anyone spends any time offering an alternate solution,
have a look at this link and count the number of places this
question has been posted

http://forum.java.sun.com/thread.jspa?threadID=591511&tstart=0
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!