You should seriously consider revising your question and be more specific. Also, you don't really need a nested loop, it seems inefficient this way. However, since you require that, here is a naive solution:
final int LIMIT = 5; //LIMIT has to be <10
//first construct a char array whose maximum number is LIMIT
char[] input = new char[2*LIMIT-1];
//if you use Arrays.fill(input, ' '); here, and a print in the first loop, you get the reverse answer (try it)
for (int i = 0; i<LIMIT; ++i) {
input[i] = Character.forDigit(i+1, 10); //converts int to char (in decimal)
input[(2*LIMIT)-i-2] = input[i];
}
//next print the array, each time removing the chars that are within an increasing range from the middle element of the array
for (int i = LIMIT; i > 0; --i) {
for (int j = 0; j < LIMIT-i; ++j) { //you don't really need a nested loop here
input[LIMIT-1+j] = ' '; //replace the j chars following the middle with whitespace
input[LIMIT-1-j] = ' '; ////replace the j chars before the middle with whitespace
}
System.out.println(input);
}
An alternative, without a nested loop, would be:
//after the first loop
String line = input.toString();
System.out.println(line);
for (int i = LIMIT; i>0; --i) {
line = line.replace(Character.forDigit(i, 10), ' ');
System.out.println(line);
}