0

What mean by illegal start of type?

Complete the Java program below so that it can store each racer's name and the best time from two times entered for two laps in 2 arrays named Racer and Time. The program will determine the winner of the match by comparing the best time of each racer. Display the best racer's name with their best time. https://code.sololearn.com/cw1fAQq47m4Z/?ref=app

29th Jan 2020, 10:32 AM
jinhee
8 ответов
+ 2
You missed one opening braces after else statement on line no 25. And also you used wrong return statement.
29th Jan 2020, 10:53 AM
A͢J
A͢J - avatar
+ 2
jinhee Check this code and your code. What you did mistake you will know. And feel free to ask any doubts. You can not use return statement inside loops. You have to use break statement. https://code.sololearn.com/chHw01TUGVkN/?ref=app
29th Jan 2020, 11:09 AM
A͢J
A͢J - avatar
+ 1
jinhee We can help but first you should clear about basics. So try to do self first and also debugging is most important things for these type of coding.
29th Jan 2020, 11:03 AM
A͢J
A͢J - avatar
+ 1
Thank you for your advice. I'll try my best
29th Jan 2020, 11:04 AM
jinhee
0
Can i ask you? What mean by bad operand type for binary operator '||'
29th Jan 2020, 10:54 AM
jinhee
0
If (laps[i] <min || laps2[i]<min); min=(laps1[i] || laps2[i]);
29th Jan 2020, 10:56 AM
jinhee
0
jinhee Here min is double value but || Condition returns Boolean value so you can not write like this. You can write like this If (laps[i] <min); min = laps1[i]; else min = laps2[i];
29th Jan 2020, 10:59 AM
A͢J
A͢J - avatar
0
So,can you help me to solve it?😭
29th Jan 2020, 10:59 AM
jinhee