Negative Zero

Please note that all blog posts before 8 April 2007 were automatically imported from LiveJournal.  To see the comments and any LiveJournal-specific extras such as polls and user icons, please find the source posting at http://brianenigma.livejournal.com/2002/02/

In Java, negative zero is perfectly acceptable:

int xyz = -0;
System.out.println(Integer.parseInt("-0"));
System.out.println(xyz);

Take THAT, Meta_Kate! 🙂

Posted in: Code Dear Diary

Leave a Reply

Your email address will not be published.