Virtusa interview question

basic concept of java. OOPs concept