System.out.println(s.charAt(0));


The problem is right here. You're printing it wrong.