[ad_1]
You can use NumberFormat; the #-sign mean that decimals are only shown if they’re non-zero.
System.out.println("Value in " + new DecimalFormat("0.########").format(m));
[ad_2]
solved Java: I want to get an Integer output in double datatype
[ad_1]
You can use NumberFormat; the #-sign mean that decimals are only shown if they’re non-zero.
System.out.println("Value in " + new DecimalFormat("0.########").format(m));
[ad_2]
solved Java: I want to get an Integer output in double datatype