How to convert String to Numeric Values in Java ?

preview_player
Показать описание
► CLICK TO DOWNLOAD COMPLETE SOURCE CODE -
***********************************************
Do Watch Video in High Quality ...
***********************************************
Рекомендации по теме
Комментарии
Автор

public static void main(String[] args) {
// TODO code application logic here
String value = "1, 000, 000.00".replace(", ", "");
System.out.println(value);
Float value2 =
System.out.println(value2);
}
//it works!

mr.RAND
Автор

thank you it was very clear and useful

Ali-IsaraMF
Автор

How to convert this string "1, 000.00" to Float? I got an error. Sad. My solution is to remove the comma sign. Should i use replace function? "1, 000.00".replace(", ", "") - it doesnt work. sad again.

mr.RAND
welcome to shbcf.ru