SyntaxFix
Write A Post
Hire A Developer
Questions
Use this:
char[] chars = {Character.toUpperCase(A.charAt(0)), Character.toUpperCase(B.charAt(0))}; String a1 = chars[0] + A.substring(1); String b1 = chars[1] + B.substring(1);