Below is my code:
public class Practice_3 {
public static void main(String[] args) {
//Question-1:
//****
//***
//**
//*
String str ="*";
int n =4;
for(int i=n; i>0; i--){
for (int j=i; j<=i;j--){
System.out.print(str);
}
System.out.print("n");
}
}
}
Whenever , i try to run it , it kept on running infinelty.