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;
}
}
}

You never asked a question... What are you having problems with? What do you need help with? etc.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.