Are the imports checked for validity at compile time? e.g. will the code containing an import such as java.lang.BOB compile? - JAVA Interview Questions

Are the imports checked for validity at compile time? e.g. will the code containing an import such as java.lang.BOB compile?


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, cannot resolve symbol.



Click Here to See Answer .....
Did you like this article ?
Subscribe to my RSS feed and get more JAVA Question, and Guideline, Plus a lot more great advice to help your Software Career.

0 comments:

Related JAVA Questions Posts