Missing value in Java

后端 未结 11 2818
慢半拍i
慢半拍i 2021-02-20 11:51

What is the statement that can be used in Java to represent a missing value of a variable. for instance I want to write a code:

if (a>=23)
 income = pay_rate;         


        
11条回答
  •  悲哀的现实
    2021-02-20 12:11

    Integer income = null;
    if (a >= 23) {
      income = payRate; // underscores are generally considered bad convention in Java
    }
    

提交回复
热议问题