+ 2

After compiling the program i get this Error:

Exception in thread "main" java.util.InputMismatchException at java.util.Scanner.throwfor(Unknown Source) at java.util.Scanner.next(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at java.util.Scanner.nextInt(Unknown Source) at DisplayCalendar.main(DisplayCalendar.java:8) Can someone please tell me what i'm doing wrong? https://code.sololearn.com/cU2rJJt4Oe3G/?ref=app

24th Apr 2018, 3:36 PM
Shivani Dakre
Shivani Dakre - avatar
8 Respostas
+ 3
On SL playground you need to put year and weekday (monday=1) on next way : 2018 —hit enter 1 ✔press submit Or: 2018 1 ✔press submit (note: 2018 and 1 are separated by space) thankyou soo much bt why this exception occurs ?? alredy i did it on cmd same code bt no error found.. why Sl occurs error ?? this is exct questioning to u guys??
24th Apr 2018, 6:11 PM
Shivani Dakre
Shivani Dakre - avatar
+ 13
This error shows if user entered non-Int type of value for year (line 8)
24th Apr 2018, 6:14 PM
LukArToDo
LukArToDo - avatar
+ 13
Shivani Dakre Welcome to the SL community 😉 Just keep coding and good luck 👍
24th Apr 2018, 6:23 PM
LukArToDo
LukArToDo - avatar
+ 12
On SL playground you need to put year and weekday (monday=1) on next way : 2018 —hit enter (go to next line) 1 ✔press submit Or: 2018 1 ✔press submit (note: 2018 and 1 are separated by space)
24th Apr 2018, 6:01 PM
LukArToDo
LukArToDo - avatar
+ 4
thank you soo much LukArToDo to resolve my code problm..actully m new on SL..nice guidance for my code ..👌
24th Apr 2018, 6:20 PM
Shivani Dakre
Shivani Dakre - avatar
+ 3
It seems to work fine now... Right?
24th Apr 2018, 4:05 PM
Fabio
+ 2
output will be displaying each month of calender but it 🙇🙇🙇
24th Apr 2018, 4:25 PM
Shivani Dakre
Shivani Dakre - avatar
0
there is a little problem of.. leap year logic 1900 6 i give this input but 1900 is not a leap year... but in your program its shows a leap year... that all.. very wonderful code i like you code.. fun coding (- _ -)
24th Apr 2018, 8:30 PM
Arun Tomar
Arun Tomar - avatar