public static String solution(String new_id) {
for(;;) {
for(int i = 0; i < answer.length(); i++) {
If(answer.substring(i) == ".) { // When the period is met
} } else {
break;
}
}
}
return answer;
}
If you write an infinite loop like this in Eclipse, the code below except return appears with a red line It says "Remove" on the quick fix.
If I use an infinite loop, can I not use the code below? Or did I write the wrong code?
java infinite-loop
You can build even if there is a red line. Press the Run button.
and answer.substring(i) in the if statement.I think you should change it to equals (".").
© 2024 OneMinuteCode. All rights reserved.