Post a New Question


posted by .

Is there a method in Java in which to see if an integer value contains characters?

  • Java -

    By definition, an integer value does not contain characters (apart from the minus sign), otherwise the value is invalid.

    If you have a String and would like to check for foreign characters, you can try:
    the matches() method using a regular expression.
    For example, if you suspect alphabetic characters, you can check using:
    // do something

    If you want to scan for all non-numeric characters, you can replace with

Answer This Question

First Name:
School Subject:

Related Questions

More Related Questions

Post a New Question