fork download
  1.  
  2. // assignment 4.3
  3. public class Test{
  4. public void display(int n)
  5. {
  6.  
  7. for(int i=1;i<=n;i++)
  8. {
  9. for(int k=0 ; k<i;k++)
  10. System.out.print("*");
  11. System.out.println();
  12. }
  13. }
  14.  
  15.  
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:3: class Test is public, should be declared in a file named Test.java
public class Test{
       ^
1 error
stdout
Standard output is empty