ternary operator
String id = request.getParameter("aaa")==null? "" : request.getParameter("aaa");
can be refactored to
String id = request.getParameter("aaa");
if(id==null) id ="";
which can be furthered reduce to
String id = Utility.isNull(request.getParameter("aaa"));
public String isNull(String input){
if(input==null) return "";
return input;
}
Turning Thirty
-
*Eric O* worked for a medical device company. The medical device industry
moves slowly, relative to other technical industries. Medical science and
safet...
7 hours ago
No comments:
Post a Comment