Learn CoreJava and advanced concepts in simple steps. This blog is maintained by Nataraz sir students from DurgaSoft and SathyaTech,Ameerpeta,Hyderabad.
This is a method which returns a string contains numbers init.The phone numbers may contain in differnt formats Ex: (123) 456-7890
123-456-7890
so we can read these type of characters and returns only the numbers using java method isDigit from Character class.