Classe para Formatar CPF
public String formatarCPF(String cpf){
if (cpf.length() < 11){
String aux = "00000000000" + cpf;
cpf = aux.substring( aux.length()-11 );
}
cpf = cpf.substring(0,3) + "." + cpf.substring(3,6) + "." + cpf.substring(6,9) + "-" + cpf.substring( cpf.length()-2 );
return cpf;
}
Vitor Yudi Hansen