Generate SQL WHERE statements in Java, You can create a character string from the acquired data, and you often use it.
How to get rid of when combining strings I think you've seen such a source. ..
code
String str = "Ah ah";
str + = "good";
str + = "Uuu";
str + = "Yes";
・
・
・
With this method, a new character string object is created every time, so it seems that the program load is applied without knowing it.
With this method, the object needs to be created only once, so it seems that the load on the program can be reduced.
code
StringBuffer sb = new StringBuffer();
sb.append ("ah oh");
sb.append ("good");
sb.append ("Uuu");
sb.append ("yeah");
String str = str.toString();
Reference URL http://qiita.com/lrf141/items/f2fc30214a26dd6ba0b7
Reference URL http://zudoh.com/archives/429
Recommended Posts