fork download
  1. public class JavaPattern
  2. {
  3. public static void main(String[] args)
  4. {
  5. /* Print newline before displaying the pattern. */
  6. System.out.println();
  7.  
  8. /* Print the pattern. */
  9. System.out.println(" J A V V A");
  10. System.out.println(" J A A V V A A");
  11. System.out.println("J J AAAAA V V AAAAA");
  12. System.out.println(" JJ A A V A A");
  13.  
  14. /* Print newline after displaying the pattern. */
  15. System.out.println();
  16. }
  17. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:1: error: class JavaPattern is public, should be declared in a file named JavaPattern.java
    public class JavaPattern
           ^
1 error
stdout
Standard output is empty