slt tt le monde j ai probleme dans ma methode java , elle n
inverse que les chaines qui ne contiennent pa d espaces , je veux que
ma methode puisse inverser toutes une phrase contenant des espaces et
des tabulation voila methode : Veuillez m aider plz
String inverse(){
String autoris="abcdefghijklmnopqrstuvwxyz";
int lg=s.length();
char []tab=new char[lg] ;
int i ;
for(i=0;i<lg;i++){
if (autoris.indexOf(s.charAt(lg-1-i))==-1)
i++ ;
else if (autoris.indexOf(s.charAt(lg-1-i))!=-1)
tab[i]=s.charAt(lg-1-i);
}
ch=new String(tab);
return ch ;
}