I'm not entirely sure what you mean, but have a look at what this line is doing, is it ever true?

if(s.charAt(i) <= s.length())