QA InfoTech interview question

Written is totally based on Java.