Published: Jul 23 2013 / 08:07
Granted, your solution is basically 'constants before variables'. The only real way to stop NPE is to check for null inside your method and handling it accordingly.
Html tags not supported. Reply is editable for 5 minutes. Use [code lang="java|ruby|sql|css|xml"][/code] to post code snippets.