How is import done in Java?

后端 未结 8 1269
终归单人心
终归单人心 2020-11-29 19:57

For instance

import org.apache.nutch.plugin.Extension,

though used many times,

I\'ve no much idea what is done essentially.

8条回答
  •  借酒劲吻你
    2020-11-29 20:39

    Buliding off of Thomas' answer, org.apache.nutch.plugin is a path to the class file(s) you want to import. I'm not sure about this particular package, but generally you'll have a .jar file that you add to your classpath, and your import statement points to the directory "./[classpath]/[jarfile]/org/apache/nutch/plugin"

提交回复
热议问题