+ 1
How can I put the input date and print the day name only?
How can I put the input date through Scanner class and not input the current date, I want to put the input past date through Scanner class and print the day name only, please help this problem.
12 odpowiedzi
+ 2
You don't added any output statement. Print finalday;
System.out.println(finalDay) ;
+ 3
Import missing :
import java.text.DateFormat;
+ 1
And I try to many times but it gives error i don't know what's the problem in this code
https://code.sololearn.com/cHwKWzFHt1lq/?ref=app
+ 1
I import this package but now it gives no output
+ 1
Thanks a lot
0
compare with newer api
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
...
DateTimeFormatter format =
DateTimeFormatter.ofPattern( "dd/MM/yyyy");
LocalDate date =
LocalDate.parse( inputDate, format);
System.out.println( date.getDayOfWeek() );
0
Thank you, I will try also this code.
0
yes
0
Sorry, but this link is not open
0
Sesao agurde serve
0
Script sucesso