|
Re: Value-returning methods with and without a parameter
Your question is unclear. Explain what exactly you're looking for. Also, you can always call a method from one class if you're in a different class, assuming that you know what package it is in. If they are in the same package, you can use TheClass.theMethodName(); so combining things into the same class isn't necessary much of the time. If they aren't in the same package, use thePackageName.TheClass.theMethodName();
If that didn't make any sense, consider putting your loops from each of your classes into methods. Then, in main, all you have to do is call the method name. After you do that, then go back and read what I just said above.
[Side note: you can also treat main like any other method, although I don't recommend doing so.]
|