Virtusa interview question

what is scanner, what is the difference between compilation error vs runtime error...