Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package nya;
- import java.util.*;
- import java.lang.*;
- public class Exp
- {
- public static void main(String[] args)
- {
- boolean[][] bool = new boolean[3][4];
- for (int i = 0; i < bool.length-1;i++)
- {
- for (int x = 0; x < bool[i].length -1; x++)
- {
- Random random = new Random();
- boolean val = random.nextBoolean();
- bool[i][x] = val;
- }
- }
- for (int i = 0; i < bool.length-1;i++)
- {
- for (int x = 0; x < bool[i].length - 1; x++)
- {
- if ( bool[i][x]==true)
- {
- System.out.print("[*]");
- }
- else
- {
- System.out.print("[ ]");
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment