Even if the input is "boy" it will still return "Kai"

Yes there was.
The code you posted could not have compiled, therefore it could not have run.