public String maskingPhone(String phoneStr) {
	phoneStr = phoneStr.replaceAll("-", "");
	String result = "";
	int strLength = phoneStr.length();
	result += phoneStr.substring(0,3);
	result += strLength == 10 ? "-***-" : "-****-";
	result += phoneStr.substring((strLength - 4 ),(strLength));
	return result;
}
//maskingPhone("010-111-1111");
//maskingPhone("010-1234-5678");

 

 

public String maskingName(String nameStr) {
	String result = "";
	int strLength = nameStr.length();
	
	result += nameStr.substring(0,1);
	
	if ( strLength == 2 ){
		result += "*";
	}else{
		String mask = "";
		for (int i = 0; i < ( strLength -2 ); i++) {
			mask += "*";
		}
		result += mask;
		result += nameStr.subSequence((strLength-1), strLength);
	}
	return result;
}
//maskingName("김김");
//maskingName("박박박");