is this java or c++??

what is the right code to this? thank you!

Can you help me? how can I add a controller in this game?