Well, this is what i have coded. I heard of recursion and some other algorithms would be able to do the job as well. Hope someone can shed some light on me lolCode:public class Test { private int start = 33; private int end = 126; public void generateCombo() { for (int a = start; a <= end; ++a) { for (int b = start; b <= end; ++b) { for (int c = start; c <= end; ++c) { for (int d = start; d <= end; ++d) { for (int e = start; e <= end; ++e) { for (int f = start; f <= end; ++f) { for (int g = start; g <= end; ++g) { for (int h = start; h <= end; ++h) { System.out.println((char) a + "" + (char) b + "" + (char) c + "" + (char) d + "" + (char) e + "" + (char) f + "" + (char) g + "" + (char) h); } } } } } } } } } public static void main(String[] args) { Test test = new Test(); test.generateCombo(); } }![]()




Reply With Quote