Thales interview question

Basics of java,oops,2 coding questions valid brackets or not and missing number in an array