Fannie Mae Interview Question

Method to determine if a string contains only digit characters

Interview Answer

Anonymous

Jun 10, 2020

If we are using python, we can use isdigit() to check if the string contains only digit characters. For JAVA, we can use matches() method to check it. E.g. str.matches(("[0-9]+"))