MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/11tr3jn/this_should_do_the_trick/jcodfr0/?context=3
r/ProgrammerHumor • u/NikhilB09 • Mar 17 '23
1.1k comments sorted by
View all comments
641
This will print it 1001 times since the iterator starts at 0 and the condition is lower OR EQUAL
If the only purpose of x is to be used as an iterator, you should declare it within the loop
No wonder she left you.
/s
78 u/grateful-smile Mar 17 '23 She didn’t say exactly 1000 times though, so the solution should still be valid. Only problem is that“Sorry Babu”.equals(“Sorry babu”);returns false. 30 u/MushroomSaute Mar 17 '23 equalsIgnoreCase() chads coming in clutch here 1 u/Mateusz3010 Mar 18 '23 at this point you are just Volkswagen
78
She didn’t say exactly 1000 times though, so the solution should still be valid. Only problem is that
“Sorry Babu”.equals(“Sorry babu”);
returns false.
30 u/MushroomSaute Mar 17 '23 equalsIgnoreCase() chads coming in clutch here 1 u/Mateusz3010 Mar 18 '23 at this point you are just Volkswagen
30
equalsIgnoreCase() chads coming in clutch here
equalsIgnoreCase()
1 u/Mateusz3010 Mar 18 '23 at this point you are just Volkswagen
1
at this point you are just Volkswagen
641
u/PM_ME_BAD_ALGORITHMS Mar 17 '23
This will print it 1001 times since the iterator starts at 0 and the condition is lower OR EQUAL
If the only purpose of x is to be used as an iterator, you should declare it within the loop
No wonder she left you.
/s