For-loops in Java don't require any code in the body. I can't control what you do with that information.

Reposting this abomination from my Reddit Account because this is important information. Uncle Bob would be proud.

57 points · 4 comments · view on lemmy.world

4 Comments

Posts@discuss.tchncs.de · 13 pts · 3y (3 replies)

Well now I just wanna see more for-loop one-liners!

lwhjp@lemmy.sdf.org · 14 pts · 3y (2 replies)

There's always the classic C strcpy :)

char *strcpy(char *dest, char *src) {
    char *p = dest;
    while (*p++ = *src++);
    return dest;
}
Zangoose@lemmy.world · 3 pts · 3y (1 reply)

Thanks I hate it

UsedRealNameB4@lemmy.world · 2 pts · 3y

I don't see the point of it 🌝