How would I go about changing an integer like '905 123 7023' into something like '9051237023'.
The assignment is supposed to determine if the phone number inputed is a real phone number.
I was going to use this:
int phoneNumber;
// Code that turns number with spaces into single number
try {
System.out.println("Please input an integer");
input = TextIO.getlnInt();
}
catch (InputMismatchException exception) {
System.out.println("This is not an phone number");
}
To determine the code