ITC Infotech interview question

basics of java and sql queries