if (results.length() == 0) { return ""; } else { return results.substring(0, results.length() - 1); }
等价于
return (results.length()>0)?(results.substring(0, results.length() - 1)):"";
时间: 2024-10-12 09:28:11
if (results.length() == 0) { return ""; } else { return results.substring(0, results.length() - 1); }
等价于
return (results.length()>0)?(results.substring(0, results.length() - 1)):"";