Java Questions Flashcards

1
Q

What is meant by the statement Java is platform independent?

A

Java is compiled into byte code, and can by run on any JVM, making it interoperable on any underlying hardware and OS.

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

What is meant by the Java platform?

A

The platform includes the Java Language Specification and the Java Virtual Machines Specification

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

What is the Java API?

A

Collection of software components that provide many useful capabilities the come prepackaged with JDk. Grouped into libraries of related classes.

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

What is the JRE?

A

Includes JVM and APIs. JRE contains enough to execute a Java app but not to compile it

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

What is the JDK?

A

JRE plus Javac. Only full Java SDK contains the javac which turns .java source files into byte code .class files.

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

What is the JVM?

A

Implementation of specification that details the behavior of a JVM.

Runs code compiled into bytecode, irrespective of language.

Java launcher tool runs application inside of JVM. JRE is the implementation of the JVM

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

What is the Class loader subsystem in the JVM

A

Takes care of finding and loading types

Also locate binary data for classes. Allocates and initializes memory for class variables

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

Runtime data area in JVM

A

Consists of method area, heap area, stack, pc registers, native stack

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

Execution engine JVM

A

Execution of the actual bytecode

Interpreter, just-in-time compiler, and garbage collector

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

If you launch three programs on the same machine, how many JVMs are created

A
  1. Only one app can run within JVM.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is fat jar

A

Contains all project class files and classes from all the libraries on which the project depends.

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