Java examples for Language Basics:Array
Converting arrays to strings
import java.util.Arrays; public class Main { public static void main(String[] args) { int[] lotto = new int[6]; //from ww w . jav a 2 s .c o m for (int i = 0; i < 6; i++) lotto[i] = (int) (Math.random() * 100) + 1; System.out.println(Arrays.toString(lotto)); } }