Suppose somewhere I import javax.servlet.http.HttpServlet.
My questions:
-
Does this mean: I could find a folder structure like javax/servlet/http somewhere and inside that HttpServlet.class file would be present?
-
If not, where exactly this class file could be found?
-
Does this mean: These are just nested namespaces with no relevance to folder structures?
-
Package name in the above mentioned import would be
javax.servletorjavax.servlet.http? Probably both are packages and first one is super package of the later one? -
How is this class file actually included? I’ve read import is not like c/c++ include.
Thanks.
yes
see 1.
see 1.
package name is
javax.servlet.httpThe classloader will locate the class (from its classpath) at runtime