double d = 3.1465926;
String result = String.format("%.2f", d);
System.out.println(result);