fork 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. classpublic class Reverse {
  9.  
  10. public static void main(String[] args) {
  11. // TODO Auto-generated method stub
  12. if (args.length == 0) {
  13. System.out.println("Should provide minimum one argument");
  14. System.exit(0);
  15. }
  16. for (int i = args.length - 1; i >= 0; i--) {
  17. System.out.print(args[i] + " ");
  18. }
  19.  
  20. }
  21.  
  22. }
  23.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:8: error: class, interface, or enum expected
classpublic class Reverse {
^
1 error
stdout
Standard output is empty