infinite-loop tag

2 questions


1 answers
127 views
0
Which is faster, "for(;)" or "while(TRUE)?

[Which is faster, (1) or (2)?I thought of this while looking at for (;;) { //Something to be done repeatedly}I've seen a lot of codes like this, but I haven't seen them write in while(true).I think wh...


1 answers
81 views
0
I have a question about java infinite loop

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 a...

1 years ago

© 2024 OneMinuteCode. All rights reserved.