Java Foundations 1 Flashcards

1
Q

What does JDK stand for?

A

Java Development Kit

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

True or False: OpenJDK is an open-source implementation of the Java Platform, Standard Edition.

A

True

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

What is the primary purpose of an IDE in Java development?

A

To provide a user-friendly environment for writing, compiling, and debugging code.

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

What does the ‘javac’ command do?

A

It compiles Java source code into bytecode.

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

What does the ‘java’ command do?

A

It runs Java applications by executing bytecode on the Java Virtual Machine (JVM).

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

Fill in the blank: Compiling converts ________ code into bytecode.

A

source

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

What is bytecode?

A

Bytecode is an intermediate representation of Java code that the JVM can execute.

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

What is the default output folder for compiled Java classes?

A

The ‘out’ folder.

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

Multiple Choice: Which command would you use to compile a Java file named ‘Example.java’?

A

‘javac Example.java’

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

True or False: You can run a Java application without compiling it first.

A

False

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

What is the role of the Java Virtual Machine (JVM)?

A

To execute bytecode and provide a runtime environment for Java applications.

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

Fill in the blank: The primary tool used to write Java applications is an ________.

A

IDE

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

What is the difference between compiling and running a Java program?

A

Compiling translates source code into bytecode, while running executes the bytecode.

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

What file extension does a Java source file have?

A

.java

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

What file extension does a compiled Java bytecode file have?

A

.class

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