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

+

A

Addition

20
Q

-

A

Subtraction

21
Q

*

A

Multiplication

22
Q

/

A

Division

23
Q

%

A

Modulus

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
Q

Occurs when either or both of the operands are integers. The result is an integer, and any factorial part of the result is lost.

A

Integer division

26
Q

Are used to evaluate the relation between the operands and generate a decision on that base.

A

Relational operators

27
Q

>

A

Greater than

28
Q

> =

A

Greater than or equal

29
Q

<

A

Less than

30
Q

<=

A

Less than or equal

31
Q

Return a Boolean value based on the Boolean result of the given expressions.

A

Logical operators

32
Q

&&

A

Logical AND operator

33
Q

||

A

Logical OR operator

34
Q
A

Bitwise and Logical XOR operator

35
Q

!

A

Unary NOT operator

36
Q

Are used to assign values to a variable.

A

Assignment operators

37
Q

It is a collection of rules that specifies which operations need to be performed in an expression.

A

Order of precedence

38
Q

A construct made up of variables and operators that evaluates to a single value.

A

Expression

39
Q

If all operands in an expression are integers and the expression returns an integer type value.

A

Integral expression

40
Q

If all operands in an expression are floating-point numbers, and the expression returns a floating-point value.

A

Floating-point expression

41
Q

An expression that has operands of different data types.

A

Mixed expression

42
Q

An expression that returns a Boolean value when evaluated.

A

Logical expression

43
Q

The methods of this class are used to read data from the standard to input device and store data into variables.

A

Scanner

44
Q

Declares an object of Scanner type named input.

A

Scanner input

45
Q

Creates a Scanner object connected to the System.in property.

A

new Scanner (System.in)