如上图此段代码优化,用三元运算符,如下代码。
String str = i == sizeInt - 1 ? ";" : "";
String sql = contains ? get(Type) : type;
sbb.append(sql).append(str);
如上图此段代码优化,用三元运算符,如下代码。
String str = i == sizeInt - 1 ? ";" : "";
String sql = contains ? get(Type) : type;
sbb.append(sql).append(str);