I want to remove the time from dateAndTime, and also want to have all of them in numeric form like this: 10-10-2019
output: Wed Nov 10 16:39:58 AST 2010
public static void main(String args[]){
//Java calendar in default timezone and default locale
int day =10;
int month =10;
int year =10;
Calendar m = Calendar.getInstance();
m.set(year, month, day);
m.add(day, 10);
System.out.println(" Date :" + m.getTime());