← Unit 2 · all exercises
Saved in this browser only

Same first letter

Return true when both words start with the same letter, ignoring capitals. Both words will have at least one letter.

boolean sameStart(String a, String b)

Solution.java
Loading editor…
Results

Examples

  • sameStart(apple, ant) → true
  • sameStart(apple, banana) → false

There are also 3 hidden tests you can't see. Solve the problem, not the examples.