Java program running out of memory -
I wrote a small program that basically starts the matrix of the rattlespace 1 of a type of object, So that it looks like this:
[1] [2] [3]
[4] [5] [6]
[7] [8] [0]
Then, there will be a large number of random moves (1000, but in my case, even 5 do not work) in the method shuffle () cell 0 is.
The program does not cause any errors, but neither (runs infinitely) does not work.
If someone can signal an error, then I would be very grateful.
Below you can find MCTEER (minimum test and readable examples) of code. You have to enter your Import java.util. *; Public Class Random Promotion 1 {Private Ent [] [] randPerm; Private Ent Row, Cola; Public Randomimmission 1 (Endless row, EIT column) {this.row = line; Col = column; RandPerm = new int [row] [cola]; Int number = 1; For (Int i = 0; I
i ++ (I ++ & lt; 5)
Comments
Post a Comment