Click here to Skip to main content
11,437,397 members (35,479 online)

The Weird and The Wonderful

   

The Weird and The Wonderful forum is a place to post Coding Horrors, Worst Practices, and the occasional flash of brilliance.

We all come across code that simply boggles the mind. Lazy kludges, embarrasing mistakes, horrid workarounds and developers just not quite getting it. And then somedays we come across - or write - the truly sublime.

Post your Best, your worst, and your most interesting. But please - no programming questions . This forum is purely for amusement and discussions on code snippets. All actual programming questions will be removed.

 
GeneralRe: What is null equal to? Pin
sloosecannon25-Aug-14 19:01
membersloosecannon25-Aug-14 19:01 
GeneralRe: What is null equal to? Pin
Rob Grainger27-Aug-14 6:47
memberRob Grainger27-Aug-14 6:47 
GeneralRe: What is null equal to? Pin
Rob Grainger29-Sep-14 0:20
memberRob Grainger29-Sep-14 0:20 
GeneralRe: What is null equal to? Pin
Paulo Zemek25-Aug-14 9:49
professionalPaulo Zemek25-Aug-14 9:49 
The problem is not the result of "null", the problem is the value.equals(null).
The first part of the if is right (value == null). The second is wrong and it would actually never execute when the value is null (and when it does execute, value will not be null, avoiding an exception).
GeneralRe: What is null equal to? Pin
V.25-Aug-14 20:43
professionalV.25-Aug-14 20:43 
JokeRe: What is null equal to? Pin
Vark11126-Aug-14 9:23
memberVark11126-Aug-14 9:23 
GeneralRe: What is null equal to? Pin
sloosecannon27-Aug-14 4:40
membersloosecannon27-Aug-14 4:40 
GeneralRe: What is null equal to? Pin
Eddy Vluggen27-Aug-14 8:33
professionalEddy Vluggen27-Aug-14 8:33 
GeneralRe: What is null equal to? Pin
sloosecannon27-Aug-14 8:41
membersloosecannon27-Aug-14 8:41 
GeneralRe: What is null equal to? Pin
Richard Deeming27-Aug-14 8:53
professionalRichard Deeming27-Aug-14 8:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.150428.2 | Last Updated 6 May 2015
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid