Hello guys, Hope ur listening. I need my code to generate 6 random numbers for each line, instead of just 1. Furthermore, there should be no duplicate numbers on any particular line. So far I have gotten this code to print only a single number per line, so I need to add 5 more numbers to each line. Thanks in advance.import java.util.List;
import java.util.ArrayList;
import java.util.Collections;
public class Lottotest
{
private static List lottoBarrel = new ArrayList(45);
private static void initializeBarrel()
{
for (int i = 1; i < 45; i++)
{
lottoBarrel.add(new Integer(i));
}
}
private static void printBarrel(String message)
{
System.out.println(message + "\n");
for (int i = 1; i <= 6; i++)
{
System.out.println("number " + i +" = " + lottoBarrel.get(i));
}
System.out.println("============");
}
public static void main(String[] args)
{
initializeBarrel();
Collections.shuffle(lottoBarrel);
printBarrel("Barrel rolled:");
}