salut,
en fait j'ai une var de type Object que j'ai converti en float
et quand j'ai utilisé DecimalFormat pour n'obtenir que deux chiffre après la virgule ça pas marché :?
voici mon code
voici l'erreurCode:
1
2
3
4
5
6
7
8
9 float convf1,convf2; Object obj; private String convS; DecimalFormat df = new DecimalFormat("########.00"); convS=obj.toString(); convf1 = Float.parseFloat(convS); convf2 = df.format(convf1);
:(Code:
1
2cannot convert from String to float