Java 9 Flashcards

1
Q

What is JShell in Java 9?

A

The Java Shell tool (JShell) is an interactive tool for learning the Java programming language and prototyping Java code. JShell is a Read-Evaluate-Print Loop (REPL), which evaluates declarations, statements, and expressions as they are entered and immediately shows the results. The tool is run from the command line.

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

What is REPL?

A

REPL stands for Read-Eval-Print Loop. It’s a tool which evaluates declarations, statements, and expressions as they are entered and immediately shows the results.

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

What is module in Java 9?

A

In Java 9, a new kind of programming component called module has been introduced. A module is a self-describing collection of code and data and has a name to identify it.

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

How modules are different than packages in Java 9 ?

A

Modules are the units that contains multiple packages and specify it’s services , exports and dependencies.

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

How does Java 9 provides backward compatibility with libraries that haven’t published themselves as modules ?

A

Though Automatic modules. Any JAR on the module path without module descriptor ends up as automatic module. It means a Java 8 jar can be required and the jar name will became the module name.

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

What is the default setting for Automatic modules regarding exporting packages and reading modules ?

A

As one purpose of automatic module is to provide backward compatibility with the module less dependencies, automatic modules exports all packages and include all other modules.

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