Here, we will read the number of days from the user. Then we will create a date object and subtract the input number of days to created date object. After that, we will print the updated date on the console screen.
Scala program to subtract days from the current date
belongs to collection: Scala Date & Time Programs
total answers (1)