In short, the %.2f syntax tells Java to return your variable ( val ) with 2 ... float myFloat = 2.001f; String formattedString = String.format("%.02f", ...
確定! 回上一頁