+ 3
Hello to all the Java people! I'll really appreciate your comments for my first code which I have shared here, please hit me :)
7 Antworten
+ 5
Nice but you need to do something for error handling in case the user puts invalid input
+ 3
I think I managed to solve it, you're welcome to check it up :)
+ 3
Nice, no more flaws, a point to keep in mind that if you make something like this again, then always remember to use the existing superclass as input,as it causes errors in some cases like this one.
+ 2
Hi Harsh, thanks for your comment. I used System.exit(1). isn't it sufficient?
if (pick < 1 || pick > 4) {
System.out.println("\n The Race can not start because you didn't pick your car!");
System.exit(1);
}
+ 2
Oh I see.. I currently have no idea but I'll try to figure it out. Thanks!
0
That's okay but try and see what happens when you input "car".
0
You're welcome