Quite lots of ways..^^^Try to get familiar with some funny stuffs, like:
class test {
public static void main (String args[]) {
double i = 0.5;
double j = 0.3;
Double result = new Double (i/j);
String output = result.toString();
int index = output.indexOf('.');
System.out.println (output.substring(0,index+1+2));
}//main
}
[SUGGESTION]THIS IS WRONG!
3.345 -> 3.34 [CORRECT]
3.356 -> 3.35 [WRONG, SHOULD BE 3.36]
3.356 -> 3.35 [WRONG, SHOULD BE 3.36]