String Method charAt


This should give my initals, how come it’s not?

If I add the

 System.out.println(firstName.charAt(0) + "" + firstName.charAt(0)); 

It print’s NG…

This explains it pretty well.

1 Like