[Solved] is there any way to convert string with hypen into integer in java(Android sdk) [closed]


You could use Long object type but not int for this data:

public Long numberify(String number) {
    Long result = Long.parseLong(number.replaceAll("[a-zA-Z|-]", ""));
    return result;
}

solved is there any way to convert string with hypen into integer in java(Android sdk) [closed]