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 ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Frank Carver
  • Junilu Lacar
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • fred rosenberger

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

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
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
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
    Bookmark Topic Watch Topic
  • New Topic