How can I come back?

I want to execute a method during a while repetition statement, but it seems go to somewhere after I do it.

I hope I can continue do it within while statement, how to ?

thanks

while(condition)

{

...

setxy();//

// hope keep doing

}

publicvoid setxy(int xy)

{

this.xy=xy;

}

[658 byte] By [ardmorea] at [2007-11-27 8:53:02]
# 1
It will just continue to loop, unless <condition> is met. Is <condition> dependent on the work that method does? Post the actual code
georgemca at 2007-7-12 21:09:43 > top of Java-index,Java Essentials,New To Java...
# 2
I don't really understand you at all, but the setxy() method will continue to be called as long as condition is true.
CaptainMorgan08a at 2007-7-12 21:09:43 > top of Java-index,Java Essentials,New To Java...
# 3
I don't understand your question. If you call setxy in the while loop, execution will leave the while loop and enter the setxy method. When the setxy method finishes, execution will resume right after the setxy method. (You need to pass an int to the setxy method for it to compile)
hunter9000a at 2007-7-12 21:09:43 > top of Java-index,Java Essentials,New To Java...
# 4
thank, i got it.sorry for the silly question.
ardmorea at 2007-7-12 21:09:43 > top of Java-index,Java Essentials,New To Java...