i have
string s = "r88i66t76s76h43";
i want output first three character then leave two character then again three
like
r88
6t7
76h
i had tried tht code but its nt give proper output(my taken string is differ from upper string..)
public class AlterStringDemo {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String s = "r98i345e45s77h9";
char ch[]= s.toCharArray();
for(int i=0;i<ch.length;i++){
for(int j=1;j<4;j++){
System.out.print(ch[i]);
continue;
}for(int k=1;k<3;k++){
System.out.println("");
}
}
}
}