title: How to check a Float variable is empty or null IN JAVA
body: <p>I have a Float variable which is initialised from a function returning the Float value, and there can be chance to return null in some cases. So I need to check the value in the variable is null or empty. If the value is empty I need to initialise variable wb1 with value 1. I am using Java Spring. This is the code currently I amusing,</p>
  
  <pre><code>Float wb1 = !StringUtils.isEmpty(getArea())?getArea() : 1.0f;
  </code></pre>
  
  <p>What is the correct way to check and initilize with value 1.0f</p>