Answer:
String date = "21/05/2020";
String dayStr = date.substring(0,2);
int day = Integer.parseInt(dayStr);
System.out.println(day);
Step-by-step explanation:
Create a variable called date which holds the current date
Create a variable called dayStr. Initialize it to the day part of the date using the substring method
Create a variable called day. Parse the dayStr and assign it to the day
Print the day