fork download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. Random rand = new Random();
  13. int m[][] = new int[30][2];
  14. for(int i = 0; i < m.length; i++) {
  15. m[i][0] = rand.nextInt(2400);
  16. m[i][1] = rand.nextInt(400);
  17. }
  18.  
  19. // Exibindo o que foi criado
  20. for(int i = 0; i < m.length; i++) {
  21. System.out.printf(" {%d, %d} ", m[i][0], m[i][1]);
  22. }
  23.  
  24.  
  25. }
  26. }
Success #stdin #stdout 0.11s 320576KB
stdin
Standard input is empty
stdout
 {1521, 215}  {934, 171}  {1093, 149}  {1053, 121}  {2231, 298}  {515, 203}  {2163, 188}  {34, 301}  {788, 372}  {910, 342}  {134, 122}  {1850, 274}  {1222, 188}  {1318, 305}  {1669, 378}  {662, 203}  {107, 49}  {318, 366}  {2041, 371}  {1018, 358}  {903, 64}  {1754, 247}  {140, 275}  {2363, 346}  {2235, 170}  {240, 2}  {1098, 275}  {1727, 394}  {2063, 96}  {1352, 205}