I need to give accuracy of a number entered by user till few digit. like if user enter some random value and gives that he wants accuracy till three digit then I need to rou
you can use string format:
Double area = 6
String ar = String.format("%.3f", area); ar = 6.000