Hi, I am new to Java and I want to know the given string is a string or number or in date format (say, dd-mm-yyyy OR mm/dd/yyyy, etc). Appreciate if any one help me out with a code? Thanks and regards, Smitha
You could use the Character.isDigit(char) method of the Character class. It determines if the specified character is a digit and returns a boolean result.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt
Smitha, An underscore is not the same as a space. Please read http://www.javaranch.com/name.jsp and re-register. We would like you to continue to post here at JavaRanch.
JavaBeginnersFaq "Yesterday is history, tomorrow is a mystery, and today is a gift; that's why they call it the present." Eleanor Roosevelt