So I was assigned to make a diamond with asterisks in Java and I\'m really stumped. Here\'s what I\'ve come up with so far:
public class Lab1
{
public s
Try this
public class Main
{
public static void main(String[] args) {
int n = 50;
int space = n - 1;
for(int i = 0; i < n; i++){
for(int j = 0; j < space; j++) {
System.out.print(" ");
}
for(int j = 0; j <= i; j++) {
System.out.print("* ");
}
System.out.println("");
space--;
}
space = 0;
for(int i = n; i > 0; i--){
for(int j = 0; j < space; j++){
System.out.print(" ");
}
for(int j = 0; j < i; j++) {
System.out.print("* ");
}
System.out.println("");
space++;
}
}
}