VARTYPESFUNCTIONS Flashcards

1
Q

What is a Java Package?

A

Creates a namespace into which you clan place your Java classes that are closely related to each other.

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

In what order are statements executed?

A

In the order in which they are written into the program, know are sequential flow of control.

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

What are primitive types?

A

Basic building blocks of other types: numbers, characters, booleans.

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

What are reference types?

A

Combines primitive and other references to complete more complex structures, like strings.

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

What are literals?

A

A value typed directly into code.

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

What is a variable?

A

A name for a location in memory.

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

What are some variable rules?

A

Cannot be used before declared.
Cannot be used before a value is assigned.
A value of the correct type must be assigned.
Can be changed at any time.
Trying to assign the wrong type is a syntax error.

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

What is scope?

A

Refers to the part of the program in which a variable may be used.
Out of scope variables cause syntax errors.
Trying to declare a second variable with same name does as well.

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

What is an expression?

A

Tells the computer how to compute a value. Combines one or more values together using operators.

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

What is a function?

A

Encapsulates a block of statements, and each time you want to execute those, you call the function.

public static void sayMyName() {
System.out.print.ln(“Bobby”);
}

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

What are parameters?

A

Input values a function needs to do it’s work.
Type must be declared.
Are arguments to the function

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

What are return values?

A

All functions must declare a return type. Type of value to be returned when fn is called.
Void return type means there is not value returned.
Otherwise, if declared, it must return a value of that type.

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

What goes into a JavaDoc?

A

A description of the function.
The name and purpose of each parameter.
The return type (if any) and a description of the expected values

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

What type of variable do you need to do arithmetic?

A

Floats.

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