The Java Compiler Looking Me Dead In The Eye

The Java Compiler Looking Me Dead In The Eye
java-memes, iterator-memes, compiler-error-memes, for-each-loop-memes, programming-frustration-memes | ProgrammerHumor.io

That moment when you're trying to loop through an Iterator in Java and the compiler just sits there judging you like this capybara. The compiler's basically saying "Sorry buddy, you can't use a for-each loop on an Iterator because... well... an Iterator IS the thing that lets you iterate!" It's like trying to drive a car factory instead of driving the actual car it produces. The worst part? Deep down you know the compiler is right, but that doesn't make the error message any less painful. You'll have to use a while(hasNext()) loop like a caveman instead.

More Like This