Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Mistake of the day

 
Mr. C Lamont Gilbert
Ranch Hand
Posts: 1170
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How could I have?



You can imagine it wasnt that hard to find...Likely a result of going from do-while to just while.
[ November 11, 2005: Message edited by: Mr. C Lamont Gilbert ]
 
Stuart Ash
Ranch Hand
Posts: 637
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is one of the most ing mistakes ever!

I know how it feels mate.

 
Tom Blough
Ranch Hand
Posts: 263
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To paraphrase my favorite Dilbert comic strip, "...don't get me started on your overuse of semi-colons...".

Cheers
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using an IDE? Automated reformatting should make the problem more visible. And I *think* Eclipse can flag such strange code (a loop with an empty statement) with a warning.
 
Tony Morris
Ranch Hand
Posts: 1608
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Ilja Preuss:
Are you using an IDE? Automated reformatting should make the problem more visible. And I *think* Eclipse can flag such strange code (a loop with an empty statement) with a warning.


Intellij IDEA certainly can - flag empty statements as warnings
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!