isDigit(char ch)

Hi guys

My method is as follows

public Boolean digitsValid (String s)

The string returns true if its length is equal to 6, but false if not. I need advice on how to use isDigit(char ch) so the expression return true if all the characters after char[0] are digits
and false otherwise.

e.g. X45678- True …Xrw345 -False

Any help appreciated

You’d apply it to each character, right?

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.