Hey JavaBean,
Really like the code, have changed the variable names so i hope you can still understand it but the method where ... is, what shall i put here?
import java.lang.*;
import java.util.*;
import java.io.*;
import java.net.*;
public class LoteryApp extends Object
{
public static void main(String[] argStrings) throws Exception
{
Random random = new Random();
int[] lotteryNumbers = new int[5];
int bonusBall = random.nextInt(49);
for (int index = 0; index < lotteryNumbers.length; index = index + 1)
{
while (!hasNotBeingPicked(beforeCheck))
{
beforeCheck = random.nextInt(49);
}
lotteryNumbers[index] = beforeCheck;
}
private boolean hasNotBeingPicked(int[] lotteryNumbers, int currentIndex, int currentNumber)
{
...
}
System.out.println("Your lucky numbers are:");
for (int index = 0; index < lotteryNumbers.length; index = index + 1)
{
System.out.println(lotteryNumbers[index]);
}
System.out.println("Your Bonus Ball is:");
System.out.println(bonusBall);
}
}