0

Why are the results not the same?

Please check the code https://code.sololearn.com/c40QN88CEENe/?ref=app

31st Aug 2019, 4:48 AM
Fernando Moceces
Fernando Moceces - avatar
3 Antworten
+ 1
because in palin2 you are using String[] and then you must compare it with equals() //if (a-b-1<y && x[b] != x[a-b-1]){ if (a-b-1<y && ! x[b].equals(x[a-b-1])) {
31st Aug 2019, 7:24 AM
zemiak
+ 1
~ swim ~ zemiak thanks a alot guys!
31st Aug 2019, 6:23 PM
Fernando Moceces
Fernando Moceces - avatar