Packages Flashcards
What are packages in Java and their uses?
How is a package created in Java?
How are multiple levels of packages created?
How are classes in a package used in another package?
Note: To import all the classes in below example use:
import com.intertech.transport.*
- A class can have as many import statements as needed.
- All import statements must go between the package statement and the class declaration.
More about imports.
More import rules
What are the default packages imported when we write a new Java class?
Where does the compiler find the path of the packages and classes?
What is the command used to provide classpath option?
How are java files and packages delivered or archived?
What are the advantages of using a JAR?
What is the command to create a JAR file?
Although the command-line option is available to create a JAR, most of the IDE’s provide an export option to create a JAR file.
Some JAR bundling rules.