The reason for this is that you never state that the program should. Look in your else method. It says "System.out.println(....); " and then nothing else
One way to do it is to wrap the method in a while(true) loop, and in the first if statement, at the end put break; . like this:
import java.io.*;
import java.util.Scanner;
public class Diamond {
public static void main(String [] args) throws IOException {
System.out.println("input number: ");
while(true)
{
BufferedReader stdin = new BufferedReader (new InputStreamReader (System.in));
String input;
int num;
input = stdin.readLine ();
num = Integer.parseInt(input);
if (num % 2 ==1){
int d = num;
int e = 0;
for (int a = 0; a <= num; a++) {
for (int c = d; c>= 1; c-- )
System.out.print(" ");
d-=1;
for (int b = 1; b <= a; b++)
System.out.print ("* ");
System.out.println();
}
num-=1;
for (int a = 0; a<=num; a++) {
for (int b = num; b > a; b--)
System.out.print (" *");
System.out.println();
for (int c = 0; c <= e; c++)
System.out.print(" ");
e+=1;
}
break;
}else
{System.out.println("Please enter an odd number!");
}
}
}
}
Note that it prints "input number" before the while loop starts so that it doesn't repeatedly print it.