Hey, i usually don't like handing out code, but i enjoyed doing this one.
import java.util.ArrayList;
public class Comma {
public static void main(String[] args) {
String num = "5,000,000";
char[] chars = num.toCharArray();
ArrayList<Character> charList = new ArrayList<Character>();
for(int i = 0; i < chars.length; i++)
{
if((chars[i] + "").equals(","))
continue;
else
charList.add(chars[i]);
}
for(char e : charList)
{
System.out.print(e);
}
}
}
If you are unfamiliar with arrays and ArrayLists and loops, then you should learn about them. You will be using them ALOT in programming.