+ 1

Please Review My Code

https://code.sololearn.com/cCMIpH0Bxl8v Are there any bugs or syntax errors ?

2nd Oct 2017, 3:29 PM
Waqas Shah
Waqas Shah - avatar
9 odpowiedzi
+ 11
You could also add a default case to handle invalid inputs. And maybe use an enum instead of a String.
2nd Oct 2017, 4:34 PM
Tashi N
Tashi N - avatar
+ 9
It's the way of practice when you only have got few options. Java time API brings it's own enum for this purpose... search for DayOfWeek ;)
2nd Oct 2017, 5:19 PM
Tashi N
Tashi N - avatar
+ 9
No, we only have the console output.
2nd Oct 2017, 6:46 PM
Tashi N
Tashi N - avatar
+ 8
You need a gui framework to show the image, so it won't work at the code playground anyways :(
2nd Oct 2017, 6:27 PM
Tashi N
Tashi N - avatar
+ 2
i do not see any bugs or anything but i recommend to take it a step further and try to use scanner to recieve input if you are trying to learn how happy coding
2nd Oct 2017, 3:46 PM
SomeoneAwesome78
SomeoneAwesome78 - avatar
+ 2
Thanks @Tashi! I created a related icon but don't know how to add links to pictures using Java so: https://www.instagram.com/p/BZwUeH-nWfQ/
2nd Oct 2017, 6:25 PM
Waqas Shah
Waqas Shah - avatar
+ 1
@Tashi N why use enum instead?
2nd Oct 2017, 5:01 PM
Waqas Shah
Waqas Shah - avatar
0
not even a link ?
2nd Oct 2017, 6:30 PM
Waqas Shah
Waqas Shah - avatar
30th Aug 2019, 7:40 AM
Waqas Shah
Waqas Shah - avatar