ulvis.paste.net

Paste Search Dynamic
Global Object
  1. import java.util.*;
  2. import java.lang.*;
  3. import java.io.*;
  4.  
  5. /* Name of the class has to be "Main" only if the class is public. */
  6. class Main
  7. {
  8.         public static void main (string[] args) throws java.lang.exception
  9. {
  10. var list = new java.util.arraylist();
  11.  
  12. var LocalDate = Java.type("java.time.LocalDate");
  13. var dt = LocalDate.now();
  14. var year = dt.year;             // Use as a property
  15. var month = dt.month;           // Use as a property
  16. var date = dt.getDayOfMonth();  // Use as a method
  17.  
  18.  
  19. print("Date:" + dt);
  20. print("Year:" + year + ", Month:" + month + ", Day:" + date);
  21. }
  22. }
Parsed in 0.018 seconds