4 回答
TA贡献1820条经验 获得超10个赞
public class Foo {
public void setPassword(String password) {
// don't do this
if (password.length() > 7) {
throw new InvalidArgumentException("password");
}
}}public class Foo {
public static final int MAX_PASSWORD_SIZE = 7;
public void setPassword(String password) {
if (password.length() > MAX_PASSWORD_SIZE) {
throw new InvalidArgumentException("password");
}
}}Integer, CharacterMath
TA贡献1895条经验 获得超7个赞
SELECT TOP 50 * FROM ordersfor (i = 0; i < 50; i++)
Session.Timeout = 50
if a < 50 then bla
const int NumOrdersToDisplay = 50if a < NumOrdersToDisplay
SmtpClient.DefaultPort = 25TCPPacketSize = whatever
添加回答
举报
