Create a Java application using nested for loops to print five rows of seven randomly generated integers between 1 and 9 inclusive.
// TestCode.java import java.util.Random; public class TestCode { public static void main(String[] args){ Random rand = new Random(); for(int i = 0;i<5;i++){ for(int j = 0;j<7;j++){ System.out.print(1+rand.nextInt(9)); } System.out.println(); } } }
Get Answers For Free
Most questions answered within 1 hours.