我有一个表,其中包含数据库中的两列status,diff_id 状态列可能包含这些值
DFG_SGG_RGRG
NULL
EF_SFEG_FTT
IFEF_RGG
abc_id可能包含这些值
null
43546
45346
45746
53465
现在我在对象 t 中获取这些值,因此我必须设置列为statusnull 并且abc_id值应为 435465666L 的条件,因此我更喜欢编写如下所示的 if 请告知它是否正确,因为我在 && 运算符之间感到困惑|| 操作员
if ( if f.getStatus()== null || abc_id() .longValue()==435465666L )
{
//perform the logic
}
请告知-这是正确的方法吗?