Java Programing Basics Flashcards

1
Q

String Literal

A

Text in double quotes “

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

Comment

A

is text a programmer adds to code, to be read by humans to better understand the code but ignored by the compiler. Two common kinds of comments exist:
single-line comment
multi-line comment

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

Single-line Comment

A

starts with // and includes all the following text on that line. Single-line comments commonly appear after a statement on the same line.

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

Multi-line Comment

A

starts with /* and ends with /, where all text between / and */ is part of the comment. A multi-line comment is also known as a block comment.

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

Whitespace

A

refers to blank spaces (space and tab characters) between items within a statement and blank lines between statements (called newlines). A compiler ignores most whitespace.

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

Syntax Error

A

is to violate a programming language’s rules on how symbols can be combined to create a program. An example is forgetting to end a statement with a semicolon.

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

Because a syntax error is detected by the compiler, a syntax error is known as a type of

A

Compile-time Error

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

Logic Error

A

also called a bug, is an error that occurs while a program runs. For example, a programmer might mean to type numBeans * numJars but accidentally types numBeans + numJars (+ instead of *). The program would compile but would not run as intended.

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

int

A

is the most commonly used integer type

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

long

A

is used for integers expected to exceed about 2 billion

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