0

Hi i am supposed to make a program to generate 3 or 4 random numbers and tell if the user has won this is what i have, i think i am going to try and use arrays instead.

import java.util.Random;


public class pick{
public void reader( String s, BufferedReader r){
InputStreamReader instr = new InputStreamReader(system.in);
s = r.readLine();
String input = "";
try{
input = reader.readLine();
}
catch(IOException e){
system.out.println("Input error numbers" + e.getMessage());
}
}
}
public class Data{
public int RandInt(){
int retVal;
Random rand = newRandom();
retVal = rand.nextInt(50) + 1;
return retVal;
public Vector(){
Random rand = new Random();
for( int i = 0;i < 5;i++){
Integer num = new Integer(Random.nextInt(10));
Storage.add(num);
}
public void PrintData(Vector vect){
for(int i=0; i < 5; i++){
vect.get(i);
Integer num = (Integer) vect.get(i);
Integer.num((Integer) vect.get(A));
}
}
}
;}


public class lottery{
private int first, second, third, fourth;
public boolean isEqual(lottery other){
if(first==other.first&&second==other.second&&third==other.third&&
fourth==other.fourth){
return true;
return false;
}
}
}

Edited by happygeek: fixed formatting

2
Contributors
1
Reply
3
Views
11 Years
Discussion Span
Last Post by server_crash
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.