Société Générale interview question

Basic questions on java and dsa