How can I Write a luckyDip() method that uses repetition to generate and display 6 random numbers for the National Lottery? The display should be of the format:
Ball 1 = 23
Ball 2 = 16
…….etc
public class Lotto { int random = (int)(Math.random()*49)+1;
//Test
public static void main (String args[]) {
Lotto l=new Lotto();
//l.luckyDip();
}
}
Aucun commentaire:
Enregistrer un commentaire