Im missing out a value if i join the 2 statements

hi im missing out this value when i type my code in a single line, but when i use (pattern), the solution is correct.

Any idea why?

Your pattern in your code is incorrect. You are using [Ja]ava. You used Ja instead of Jj. That’s why you are getting an incorrect answer.

I see! what a silly typo!! hahaha thanks a lot!