acomputerdog

Matrix Java Program

Jan 21st, 2015
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package net.acomputerdog.PPII;
  2.  
  3. import java.util.Random;
  4.  
  5. public class Matrix {
  6.     public static void main(String[] args) {
  7.         Random random = new Random("Null".hashCode());
  8.         while (true) {
  9.             for (int count = 0; count < 80; count++) {
  10.                 if (random.nextInt(4) == 0) {
  11.                     System.out.print((char)(97 + random.nextInt(26)));
  12.                 } else {
  13.                     System.out.print(' ');
  14.                 }
  15.             }
  16.             System.out.println();
  17.             try {
  18.                 Thread.sleep(10);
  19.             } catch (InterruptedException ignored) {
  20.                
  21.             }
  22.         }
  23.     }
  24. }
Add Comment
Please, Sign In to add comment