可以借助日历类来实现
int n = 10; Calendar instance = Calendar.getInstance(); instance.set(Calendar.DATE, n); Date time = instance.getTime();