- Joined
- Sep 13, 2008
- Messages
- 1,230 (0.22/day)
- Location
- Metro Atlanta
Processor | AMD Ryzen 1700 |
---|---|
Motherboard | Gigabyte AB350 GAMING 3 |
Memory | 16GB (2x8) 3200MHz |
Display(s) | Acer 24" LCD |
Software | Windows 10 Pro |
Can someone give me an example of this. I'm working on a project, and I can't seem to get these damn variables to pass to other methods. Here is what I have so far(its not done).
This is due at by midnight, I have gone through the book and Google searched, but im not understanding. Could someone point me in the right direction?
Oh, and my teacher is out of town with no service
Thanks guys.
Code:
import java.util.Scanner;
public class Eggs
{
public static void main (String[] args)
{
Scanner input = new Scanner (System.in);
int eggs;
System.out.println(" Please enter in an integer: ");
eggs = input.nextInt();
passedEggs(eggs);
System.out.println(eggs);
}
private int passedEggs()
{
int equalDozen;
int remainderEggs;
equalDozen = eggs / 12;
remainderEggs = eggs % 12;
return eggs;
}
}
This is due at by midnight, I have gone through the book and Google searched, but im not understanding. Could someone point me in the right direction?
Oh, and my teacher is out of town with no service
Thanks guys.