How to Remove Unwanted Characters From String

 public class Test
{
  public static void main(String[] args)
  {
    String s = "(987)-654-321";
    s = s.replaceAll("[^a-zA-Z0-9]", "");
    System.out.println(s);
  }

}

Output
987654321