IntelliJ console sometimes not displaying output
public class Output {
protected static void secondGen(String[][] arr,int N,int M){
String[][] arrSwap = new String[N][M];
int count=0;
for(int i=0;i<N;i++){
for(int j = 0; j<M;j++){
count++;
int random = ThreadLocalRandom.current().nextInt(1,((N*M)/2)+1);
String number = String.valueOf(random);
arrSwap[i][j] = number;
if(count%2==0){
if(!ArrayGen.arrOutputValidation(arrSwap,N,M,i,j)){
j--;
count--;
}
}
}
}
Utility.render(arrSwap);
}
}
Sometimes at random console just hangs up and doesn't show any output. In those instances I can just continue typing lines forever in the console even though I shouldn't be able to type anything more and nothing ever comes up. While other times the Utillity.render(Which is essentially a customized System.out.println) renders the array and the program finishes.
from Recent Questions - Stack Overflow https://ift.tt/3rzsxhV
https://ift.tt/eA8V8J
Comments
Post a Comment