int month = 6;
Log.i(TAG, "month :" + month );
String str_month = String.format("%02d", month);
Log.i(TAG, "str_month :" + str_month );
输出:
month :6
str_month :06
int month = 6;
Log.i(TAG, "month :" + month );
String str_month = String.format("%02d", month);
Log.i(TAG, "str_month :" + str_month );
输出:
month :6
str_month :06