About this question
I am using math.round() to round off. this is the code:
class round{
public static void main(String args[]){
double a = 123.13698;
double roundOff = Math.round(a*100)/100;
System.out.println(roundOff);
}
}
the output I get is 123 but I want it to be 123.14.
How to implement code to get the java roundup double and obtained desired output?