fork download
  1.  
  2. class Main {
  3.  
  4. public static void main(String[] args) {
  5. long timestamp = 1354312800;
  6. java.util.Date time=new java.util.Date((long)timestamp*1000);
  7.  
  8. int d = time.getDate();
  9. int m = time.getMonth();
  10.  
  11. System.out.println(d); // prints 30
  12.  
  13.  
  14. }
  15. }
Success #stdin #stdout 0.03s 245632KB
stdin
Standard input is empty
stdout
30