Code example for NumberFormat

Methods: setMaximumFractionDigitssetMinimumFractionDigits

0
	private float distanceFromCurrent;
	 
	private static NumberFormat numberFormat = NumberFormat.getInstance();
	 
	static { 
		numberFormat.setMaximumFractionDigits(1);
		numberFormat.setMinimumFractionDigits(1);
	} 
 
	private int stopNumber;
 
	public float getDistanceFromCurrent() { 
		return distanceFromCurrent;
	} 
 
	public void setDistanceFromCurrent(float distanceFromCurrent) {
		this.distanceFromCurrent = distanceFromCurrent;
	} 
 
	public String getDisplayName() {
Stop searching for code, let great code find you!  Add Codota to your java IDE