Calling a method without parameters

Joined
Oct 26, 2009
Messages
1
Reaction score
0
Hi i'm having trouble calling my method in a class. I can't seem to use my tester user input and apply it to the class.

here is the code from the class:

Code:
  public int nextNumber()
      {
         if(count < 2)
         {
         	count++;
            return 1;
         }
         else
         {
            fnew = fold1 + fold2;
         
            fold2 = fold1;
            fold1 = fnew;
         
            return fnew;
         }
      }

and using the method nextNumber() how do I get the user's input to be applied in the method because it doesn't have parameters! I know theres a way I just can't figure it out! Thanks in advance!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,535
Members
45,007
Latest member
obedient dusk

Latest Threads

Top