public class Star08 {
	public static void main(String args[]) {

		int in = 5;
		int st = 0;
		for (int line = 0; line < in; line++) {
			for (int put = 0; put < in; put++) {
				System.out.print((put > st) && (put<in-st-1) ? "  " : "* ");
			}
			if (line < in / 2) {
				st++;
			} else {
				st--;
			}
			System.out.println();
		}
	}
}

+ Recent posts