Monthly Archives: January 2012

.equals(), the other way

The new year bring with it a new project for me.
The new project came new colleagues.
And the new colleagues write funny stuff.
One colleague has his own way to check if two strings are the the same:

if (nodeId.compareTo("HEADER") == 0) {
	// ...
}
if (nodeId.compareTo("SHEET") == 0) {
	// ...
}
if (nodeId.compareTo("FOOTER") == 0) {
	// ...
}


Follow

Get every new post delivered to your Inbox.