I’m not able to use isDigit() in my program. When I use it says “The method isDigit(char) is undefined for type calculator”.
*calculator is my class.
*I’m trying to go through all the characters of a string and check whether they are valid input characters for a calculator.
I’m not able to use isDigit() in my program. When I use it says
Share
isDigitis a static method of theCharacterclass. To call a static method you should prefix the method reference with the name of the class it belongs to, like this: