|
Merouen, Have a look in javadoc: java.text.NumberFormat and java.text.DecimalFormat classes. You will have to import these. The code goes something like: NumberFormat nf = new DecimalFormat("###"); System.out.println("number is " + nf.format(number); Merouen Ballout wrote: as example code 1.11 the average is declared like primitive type double so in the output it should be double , so what's method can be used in order to to display after point?thanks --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~--- |
- [java programming] lab-1034 controls Merouen Ballout
- [java programming] Re: lab-1034 controls miga
- [java programming] Re: lab-1034 controls Juan Hdz.
- [java programming] Re: lab-1034 controls Diogo Oliveira
- [java programming] Re: lab-1034 controls Marco Versele
