public class Test {
private static String str="MIIC7jCCAlegAwIBAgIUfnKSsmMcfWy5GAoQXSvRUOCqDgAwDQYJKoZ";
private static StringBuffer sb=new StringBuffer();
public static void main(String[] args) {
String temp=null;
for(int i=0;i<str.length();i++){
if(i%5==0){
if(i+5<str.length()){
temp=str.substring(i, i+5);
sb=sb.append(temp.concat("\r\n"));
}else{
temp=str.substring(i,str.length());
sb=sb.append(temp);
}
}
}
System.out.println(sb.toString());
}
}