Hi Mudzy, welcome to DaniWeb.
Your code looks OK.
You could combine both "if" tests into one with a logical OR ( || ), which is a bit shorter, but a bit less clear maybe.
You could use the Character class to convert c to upper case, then use just one comparison to compare it to s.toUpperCase().charAt(0), which would save you one "if" test, but add a couple of method calls, so it's not a lot better really.
JamesCherrill
Posting Genius
6,371 posts since Apr 2008
Reputation Points: 2,130
Solved Threads: 1,073