Results 1 to 2 of 2
Thread: NumberFormat Class Question
- 10-22-2012, 10:57 AM #1
Member
- Join Date
- Oct 2012
- Posts
- 8
- Rep Power
- 0
NumberFormat Class Question
Its telling me it cant find getInstance() inside of the NumberFormat class. why?
Java Code:public String convertString (int numberOfDigits) { //return the value of the Rational number up to the numberOfDigits fractional digits double toStr; toStr = (double)numerator / (double)denominator; NumberFormat newForm = new NumberFormat.getInstance(); newForm.setMaximumFractionDigits(numberOfDigits); newForm.setMinimumFractionDigits(numberOfDigits); stringNum = newForm.format(Double.toString(toStr)); return stringNum; }
- 10-22-2012, 11:07 AM #2
Member
- Join Date
- Oct 2012
- Posts
- 8
- Rep Power
- 0
Similar Threads
-
A (very) simple question about NumberFormat in Applet
By calnastic in forum New To JavaReplies: 2Last Post: 06-17-2011, 03:34 AM -
NumberFormat which leave fractions as they are
By itaipee in forum AWT / SwingReplies: 2Last Post: 12-09-2009, 06:11 PM -
using numberformat
By roaan in forum New To JavaReplies: 3Last Post: 07-02-2009, 04:28 AM -
NumberFormat is abstract?
By DrKush in forum New To JavaReplies: 4Last Post: 03-27-2009, 07:54 AM -
Parsing a number using a NumberFormat
By Java Tip in forum java.textReplies: 0Last Post: 04-16-2008, 11:03 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks