Computer Programming 1 Flashcards

MIDTERM

1
Q

Used to specify the set of values and their operations. The values have particular data types because they are stored in memory of the same format and have the same operations defined for them.

A

Data type

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

The fundamental data types in Java. These are predefined data types by the language and named by a keyword.

A

Primitive data types

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

8-bit signed integer (0)

A

Byte

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

16-bit signed integer (0)

A

Short

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

32-bit signed integer (0)

A

Int

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

64-bit signed integer (0L)

A

Long

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

Single-precision 32-bit IEEE (0.0f)

A

Float

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

Double-precision 64-bit IEEE (0.0d)

A

Double

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

One bit information (false)

A

Boolean

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

Single 16-bit Unicode character (‘\u0000’)

A

Char

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

A name for a memory location that stores a specific value, such as numbers and letters.

A

Variable

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

A memory location whose value cannot be changed during program execution.

A

Constant

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

Keyword used to specify that the value stored in the variable_name is fixed and cannot be changed.

A

final

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

Refers to converting a value from a specific type to a variable of another type.

A

Type casting

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

The conversion of the lower precision data type to a value of a higher precision data type.

A

Widening conversion (implicit casting)

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

The conversion of a higher precision data type into a blue of a lower precision data type.

A

Narrowing conversion (explicit casting)

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

These symbols tell the compiler or interpreter of the program to perform a specific mathematical, relational, or logical operation and produce the final result.

A

Operators

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

Used to perform basic mathematical operations on numerical values.

A

Arithmetic operators

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

+

20
Q

-

A

Subtraction

21
Q

*

A

Multiplication

22
Q

/

23
Q

%

24
Q

Occurs when either or both of the operands are floating-point values and the result is a floating-point value.

A

Floating-point division

25
Occurs when either or both of the operands are integers. The result is an integer, and any factorial part of the result is lost.
Integer division
26
Are used to evaluate the relation between the operands and generate a decision on that base.
Relational operators
27
>
Greater than
28
>=
Greater than or equal
29
<
Less than
30
<=
Less than or equal
31
Return a Boolean value based on the Boolean result of the given expressions.
Logical operators
32
&&
Logical AND operator
33
||
Logical OR operator
34
^
Bitwise and Logical XOR operator
35
!
Unary NOT operator
36
Are used to assign values to a variable.
Assignment operators
37
It is a collection of rules that specifies which operations need to be performed in an expression.
Order of precedence
38
A construct made up of variables and operators that evaluates to a single value.
Expression
39
If all operands in an expression are integers and the expression returns an integer type value.
Integral expression
40
If all operands in an expression are floating-point numbers, and the expression returns a floating-point value.
Floating-point expression
41
An expression that has operands of different data types.
Mixed expression
42
An expression that returns a Boolean value when evaluated.
Logical expression
43
The methods of this class are used to read data from the standard to input device and store data into variables.
Scanner
44
Declares an object of Scanner type named input.
Scanner input
45
Creates a Scanner object connected to the System.in property.
new Scanner (System.in)