Win a copy of Escape Velocity: Better Metrics for Agile Teams this week in the Agile and Other Processes forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
Sheriffs:
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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

 
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
author & internet detective
Posts: 41253
849
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
eat bricks! HA! And here's another one! And a tiny ad!
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic