Chapter 1 Flashcards

1
Q

What is the code written by a programmer?

A

Source code

Source code is the human-readable instructions that a programmer writes.

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

What does a compiler do?

A

Translates source code into executable code

A compiler converts high-level programming language into machine code.

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

What file extension is used for Java source code?

A

.java

The .java extension indicates a file contains Java source code.

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

What file extension does the Java compiler create?

A

.class

The .class files contain the bytecode that the Java Virtual Machine (JVM) can execute.

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

Which files does the JVM read?

A

.class

The JVM executes the bytecode contained in .class files.

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

What command is used to run the Java compiler from the command line?

A

javac

The command ‘javac’ compiles Java source files into bytecode.

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

command to run Java PROGRAM from command line:

A

java

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

receiving a divide by zero error when the program is executed is an example of:

A

a runtime error

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

true or false: machine language can be used to write programs that can run on ANY machine.

A

FALSE

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

Syntax errors will be detected when?

A

at compile time

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

What are Attributes?

A

data contained in an object

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

What are Methods?

A

procedures, or behaviors, that an object performs

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

What is Encapsulation?

A

combining of data and code into a single object

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

What is Data-Hiding?

A

refers to an objects ability to hide its data from code outside the object.

***an object hides its data but allows outside code to access methods that operate on the data

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

Who originally developed Java and year developed as well year presented? Name of person and corporation (+ the name it has now)

A

in 1991 James Gosling at Sun Microsystems developed Java. (now known as Oracle Corp.) In 1995 presented.

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

The purpose of validating the results of the program is:

A

To determine whether the program solves the original problem

17
Q

Syntax is:

A

Rules that must be followed when writing a program

18
Q

Software refers to:

19
Q

RAM is usually:

A

A volatile type of memory, used only for temporary storage

20
Q

One of the design tools used by programmers when creating a model of the program is:

A

Pseudocode

21
Q

Keywords are:

A

Words that have special meaning in the programming language

22
Q

Byte code instructions are read and interpreted by:

A

The JVM (Java Virtual Machine)

23
Q

A runtime error is usually the result of:

A

A logical error

24
Q

A program is a sequence of instructions stored in:

A

The computers memory

25
A computer program is:
A set of instructions that enable the computer to solve a problem or perform a task
26
A byte has how many bits?
8
27
This is a software entity that contains data and procedures
Class
28
These are used to indicate the end of a Java statement
Semicolons