user image

Pooja Sharma

Job Interview Skills
English
2 years ago

25. Are the imports checked for validity at compile time? Example: will the code containing an import such as java.lang.ABCD compile?

user image

Abhishek Mishra

2 years ago

Yes the imports are checked for the semantic validity at compile time. The code containing above line of import will not compile. It will throw an error saying, can not resolve symbol symbol : class ABCD location: package io import java.io.ABCD;

Recent Doubts

Close [x]