java code optimization

1.List collections: determining whether a value IF ( List =! Null && List .size ()> 0 ), it should be used list.isEmpty (). The former complexity o (n) which is only o (1)
2. return"/ EBID / bidIfmView"; string should be repeated using a static variable or enumeration class, an update, the extra use. When jsp page updates, you only need to modify a place can be. Elsewhere stringvariables, too
 



Guess you like

Origin www.cnblogs.com/jkwll/p/11387106.html