@Vijay: I've removed your complete solution. See the forum description:
We're all here to learn, so when responding to others, please focus on helping them discover their own solutions, instead of simply providing answers.
@siddu
Hi and welcome to the JavaRanch!
Try to iterate through the string and check if each character is a number/somethingElse.
"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.