Search:

Type: Posts; User: KevinWorkman

Search: Search took 0.07 seconds.

  1. Re: How to call a value from a different method to main

    No worries, everybody starts out feeling that way. Good programmers probably feel that way throughout most of their careers. The more you learn, the more you find out what you don't know.
  2. Re: How to call a value from a different method to main

    What? Why? My add() method example was just an example. It has nothing to do with your code, other than the fact that it contains a method that returns a value, and a variable that holds that value....
  3. Re: How to call a value from a different method to main

    What did you try? The parameters have nothing to do with the return value. It was just an example.
  4. Re: How to call a value from a different method to main

    I see your confusion. The problem is that you have two different variables named iMenuInput, and they each have their own scope. One is only visible in the main() method, and the other is only...
  5. Re: How to call a value from a different method to main

    Believe it or not, you already know how to store a value returned from a method in a variable. The Scanner methods nextLine() and nextInt() are simply methods that return values. You'd store the...
  6. Re: How to call a value from a different method to main

    You're returning a value from your menu() method, but then you aren't doing anything with that value (like storing it in a variable). Are you sure that's what you want to be doing?
Results 1 to 6 of 6