How to eliminate comma from the String

public class Program {

	public static void main(String[] args) {

		String str = "1,110"; // Eliminate , from the String

		String newStr = str.replace(",", "");//replace method will replace the comma with nothing

		System.out.println("Before Eliminating comma :" + str);
		
		System.out.println("After Eliminating comma :" + newStr);

	}

}

Design a site like this with WordPress.com
Get started