daily pastebin goal
8%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 64 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. Best practice for Null check in Java
  2. if(test ! = null)
  3.    
  4. if(null != test)
  5.    
  6. // no compiler complaint at all for C/C++
  7. // while in Java, this is illegal.
  8. if(a = 2) {
  9. }
  10. // this is illegal in C/C++
  11. // and thus become best practice, from C/C++ which is not applicable to Java at all.
  12. if(2 = a) {
  13. }
  14.    
  15. if("bla".equals(test))
  16.    
  17. if(test.equals("bla"))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top