为什么eclipse IDE控制台不显示日志范围结果
我尝试在控制台上打印结果,但结果显示最后1000-1200行。
我尝试执行以下字符组合程序,但cansole仅显示最后几行。
public class Combination_4 {
public static void main(String[] args) {
// Create an alphabet to work with
char[] alphabet = new char[] {'a', 'b', 'c', 'd', 'e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z','A','B','C','D','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z','~','!','@','#'};
// Find all possible combinations of this alphabet in the string size of 3
StringExcersise.possibleStrings(4, alphabet,"");
}
}
class StringExcersise {
static int count=0;
public static void possibleStrings(int maxLength, char[] alphabet, String curr) {
// If the current string has reached it's maximum length
if(curr.length() == maxLength) {
count=count+1;
System.out.println(curr);
// Else add each letter from the alphabet to new strings and process these new strings again
} else {
for(int i = 0; i < alphabet.length; i++) {
String oldCurr = curr;
curr += alphabet[i];
possibleStrings(maxLength,alphabet,curr);
curr = oldCurr;
}
}
}