public static String timestamp(){
  Calendar calendar=Calendar.getInstance();
  return "" + calendar.get(Calendar.YEAR) + calendar.get(Calendar.MONTH)+ calendar.get(Calendar.DAY_OF_MONTH)+ calendar.get(Calendar.HOUR)+ calendar.get(Calendar.MINUTE)+ calendar.get(Calendar.SECOND);
}

public static String timestamp ( ) { Calendar calendar = Calendar . getInstance ( ) ; return "" + calendar . get ( Calendar . YEAR ) + calendar . get ( Calendar . MONTH ) + calendar . get ( Calendar . DAY_OF_MONTH ) + calendar . get ( Calendar . HOUR ) + calendar . get ( Calendar . MINUTE ) + calendar . get ( Calendar . SECOND ) ; }
returns a stringified value of the current time . < p > note : you probably don ' t want to call this in a tight loop .
