如果 条件 内代码 只有一条时,if()可以省略花括号.
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
dqdata other = (dqdata) obj;
if (col1 == null) {
if (other.col1 != null)
return false;
} else if (!col1.equals(other.col1))
return false;
return true;
}