Packages Flashcards

1
Q

What are packages in Java and their uses?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a package created in Java?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

How are multiple levels of packages created?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How are classes in a package used in another package?

A

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.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

More about imports.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

More import rules

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the default packages imported when we write a new Java class?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Where does the compiler find the path of the packages and classes?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the command used to provide classpath option?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How are java files and packages delivered or archived?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the advantages of using a JAR?

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the command to create a JAR file?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Some JAR bundling rules.

A
How well did you know this?
1
Not at all
2
3
4
5
Perfectly