Advertisement
Guest User

Untitled

a guest
Jun 16th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. class *****
  2. {
  3. public void ***** throws IOException
  4. {
  5. int [] ntime = new int [6];
  6. BufferedReader inbr = new BufferedReader (new
  7. InputStreamReader(System.in));
  8. Calendar now= Calendar.getInstance();
  9. ntime[0] = now.get(Calendar.YEAR);
  10. ntime[1] = now.get(Calendar.MONTH);
  11. ....
  12. ntime[5] = now.get(Calendar.SECOND);
  13. }
  14. }
  15.  
  16.  
  17. class ***** {
  18. public static void main(String args[]) throws IOException
  19. {
  20.  
  21. ***** objecta = new ***();
  22. objecta.test01();
  23. System.out.println("Time is " + ntime[0] + ... + ntime[5]);
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement