Here you can find the source of formatVersion(float versionNumber)
Parameter | Description |
---|---|
versionNumber | a parameter |
public static String formatVersion(float versionNumber)
//package com.java2s; //License from project: Open Source License import java.text.DecimalFormat; import java.text.NumberFormat; public class Main { /**//from ww w.ja v a 2 s.co m * Format version number into #0.0 form * @param versionNumber * @return */ public static String formatVersion(float versionNumber) { NumberFormat formatter = new DecimalFormat("#0.0"); return formatter.format(versionNumber); } }