Are the imports checked for validity at compile time? Example: will the code containing an import such as java.lang.ABCD compile? Ans. 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; - Study24x7
Social learning Network
20 Nov 2023 12:48 PM study24x7 study24x7

Are the imports checked for validity at compile time? Example: will the code containing an import such as java.lang.ABCD compile? Ans. 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 ...

See more

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles