Any suggestions?

I have written a simple program that simulates the Lottery draw using the Math.random() method. However i want to implement a mechanism that when i run the program, each random number is displayed in time lapses of five seconds rather than all at one. I have heard about a Sleep() method which could do this but i don't know how to use it. Can anyone help me with this implementation? Below is the code for the program.
import corejava.*;

public class Lotto
public static void main(String[] args)
String pause;
int i;
System.out.println(" TODAY'S LOTTERY NUMBERS");

for (i=1; i<=6; i++)
int j = (int) (Math.random() * 48) + 1;
System.out.print(" " + j);

pause = Console.readString("Press ENTER Key to exit");


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!