Here is a very simple program i cannot compile, the err i am getting
is that the main class doesnot recognize the LotteryCompare class. Its
like it doesnt exists. Please any help
...... LotteryCompare class ......
public class LotteryCompare implements Runnable
{
public int[] mine;
public int[] lottery = {1, 3, 11, 24, 26, 29, 32, 33, 34, 37,
39, 44, 47, 48, 51, 60, 64, 69, 70, 72};
public int count=0;
public boolean finished = false;
private Thread runner;
//constructor
public LotteryCompare(int args[])
{
mine = args;
if (runner == null)
{
runner = new Thread(this);
runner.start();
}
}
public void run()
{
//check for match
input(mine, lottery);
finished = true;
}
public void input(int mine[], int lottery[])
{
for(int i = 0; i < mine.length; i++)
{
for(int b=0; b < lottery.length; b++)
{
if(mine[i] == lottery[b])
{ count++;
System.out.println("Matching Number: "
+ mine[i] + " [" + count + "]");
}
}
}
}
}