aspose file tools*
The moose likes Beginning Java and the fly likes to and fro out of a loop to a method in back? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "to and fro out of a loop to a method in back?" Watch "to and fro out of a loop to a method in back?" New topic
Author

to and fro out of a loop to a method in back?

DANIEL GRESHAM
Greenhorn

Joined: Feb 09, 2005
Posts: 21
is there a way to put a method call in a loop, so that once an array for this instance is incrimented, the program jumps to a method, finds a case in a flow control, jumps to another method completes a task and then jumps back to the loop itself? if so how would i do that or does jave do it itself do I need to include any return statements or anything i need to know before I try this action. and since this is a bit vague i will include some code

any help on this will be much appriciated.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29241
    
139

Daniel,
You are 99% there. You just need to call the method from the loop:

I didn't see the array update you mentioned (it may be there, I didn't read every line of code.) You could add this right before the call to command fetch.

Each time the loop executes, commandFetch() is called. That method calls the appropriate commandXXX() method. After the commandXXX() method is called, it returns to commandFetch(). As there is nothing left in commandFetch() to do, it returns control to the loop.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: to and fro out of a loop to a method in back?
 
Similar Threads
NIO Selector - single threaded use
calling and no ringing apparently
Oh, God I NEED Help!!!!!!!!
Trials and tribulations, trys and catches
StringTokenizer Class