fork download
  1. import java.io.*;
  2.  
  3. /* Name of the class has to be "Main" only if the class is public. */
  4. class Ideone
  5. {
  6. public static void main (String[] args) throws java.lang.Exception
  7. {
  8. int day;
  9. int month;
  10. int year;
  11.  
  12.  
  13. day = date.get(Calendar.DAY_OF_MONTH);
  14. month = date.get(Calendar.MONTH);
  15. year = date.get(Calendar.YEAR);
  16.  
  17. System.out.println("WELCOME TO SWAGGER DISTRIBUTION!");
  18. System.out.println("Today's date is "+(month+1)+"/"+day+"/"+year);
  19.  
  20. }
  21. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Main.java:12: error: cannot find symbol
    GregorianCalendar date = new GregorianCalendar();
    ^
  symbol:   class GregorianCalendar
  location: class Ideone
Main.java:12: error: cannot find symbol
    GregorianCalendar date = new GregorianCalendar();
                                 ^
  symbol:   class GregorianCalendar
  location: class Ideone
Main.java:14: error: cannot find symbol
    day = date.get(Calendar.DAY_OF_MONTH);
                   ^
  symbol:   variable Calendar
  location: class Ideone
Main.java:15: error: cannot find symbol
    month = date.get(Calendar.MONTH);
                     ^
  symbol:   variable Calendar
  location: class Ideone
Main.java:16: error: cannot find symbol
    year = date.get(Calendar.YEAR);
                    ^
  symbol:   variable Calendar
  location: class Ideone
5 errors
stdout
Standard output is empty