Code example for NumberFormat

Methods: format

0
        StatisticsServicesImplementation.getInstance(), 
        m_model);
 
    final NumberFormat numberFormat = sampleModelViews.getNumberFormat();
 
    assertNotNull(numberFormat);
    assertSame(numberFormat, sampleModelViews.getNumberFormat());
 
    assertEquals("1.23", numberFormat.format(1.234));
 
    m_consoleProperties.setSignificantFigures(4);
 
    final NumberFormat numberFormat4sf = sampleModelViews.getNumberFormat();
    assertNotSame(numberFormat, numberFormat4sf);
    assertEquals("1.234", numberFormat4sf.format(1.234));
  } 
} 
Stop searching for code, let great code find you!  Add Codota to your java IDE