title: How to remove unwanted zeros from decimal number in Java (Selenium).But if last digit is not 0 then it should be displayed
body: <p>I am querying lot of fields from Teradata and validating with the values displayed in UI using Selenium (Java). All my fields have only 3 decimal points.</p>
  
  <p>For Eg,Number in DB = <code>4.199</code> is displayed as <code>4.199</code> in <code>UI</code> and Number in <code>DB</code> = <code>4.190</code> is displayed as <code>4.19</code> in <code>UI</code> and Number in <code>DB</code> = <code>4.100</code> is displayed as <code>4.1</code> in <code>UI</code></p>
  
  <p>When I assert, <code>4.190</code> and <code>4.19</code> are considered different by Selenium. I have lot of fields of this kind.How can I solve this?</p>
  
  <p>Is there any other function like cast or round that can format the data in the way I want?</p>