That is interesting. You'd think when you set decis to null, when you tried to add to it you would get a compiler error or something, but it seems to just concatinate to it as if null was the String...
Type: Posts; User: aussiemcgr
That is interesting. You'd think when you set decis to null, when you tried to add to it you would get a compiler error or something, but it seems to just concatinate to it as if null was the String...
Give an example of the output. I'm having trouble visualizing where the null is.
Yes, but the int place value would be the value the user inputs for the number of decimal places. So you would want to set places to whatever the user inputs for the number of decimal places. So that...
You dont have to actually loop to do this. DecimalFormat has a method called setMaximumFractionDigits(int). So, we can simply use this to set the number of places. Here is a snippet of code I made...