MathWorks interview question

Java basic concept/ output of some codes