Pinnacle Infotech interview question

OOPS concept for java & SQL related.