Java tutorial
//package com.java2s; //License from project: Apache License import android.text.TextUtils; public class Main { public static String formatPhoneNum(String phoneNum) { if (TextUtils.isEmpty(phoneNum)) { return null; } return phoneNum.replace(" ", ""); } }