C++:
for(int i=0; i<100; i++);"I said run 100! WHY is it only running once!?!?!"
{
// Do stuff
}
Ruby:
post.each{ |line|"It never processes a single line!"
foo(post)
...
}
Java:
System.out.println("Using " + 1 + runtime.availableProcessors() + " threads.");
"I know it's multicore, but my computer doesn't have, like, 11 processors does it?"
The semicolon masking the block is still one of my favorite c++ bugs. Granted, the compiler should give a warning. Everyone does treat warnings as errors, right? :)
ReplyDeleteI have read your blog its very attractive and impressive. I like it your blog.
ReplyDeleteJava Training in Chennai Core Java Training in Chennai Core Java Training in Chennai
Java Online Training Java Online Training JavaEE Training in Chennai Java EE Training in Chennai