fork(1) download
  1. /* package whatever; // don't place package name! */
  2.  
  3. import java.util.*;
  4. import java.lang.*;
  5. import java.io.*;
  6.  
  7. /* Name of the class has to be "Main" only if the class is public. */
  8. class Ideone
  9. {
  10. public static void main (String[] args) throws java.lang.Exception
  11. {
  12. int linhas = 4;
  13. int colunas = 7;
  14.  
  15. for (int i = 0; i < colunas; i++) {
  16. System.out.print("*");
  17. }
  18. System.out.println();
  19. for (int i = 0; i < linhas - 2; i++) {
  20. System.out.print("*");
  21. for (int j = 0; j < colunas - 2; j++) {
  22. System.out.print("*");
  23. }
  24. System.out.println("*");
  25. }
  26. for (int i = 0; i < colunas; i++) {
  27. System.out.print("*");
  28. }
  29. System.out.println();
  30. }
  31. }
Success #stdin #stdout 0.06s 2841600KB
stdin
Standard input is empty
stdout
*******
*******
*******
*******