Module 2 Flashcards

1
Q

Is an attribute associated with a piece of data that tells a computer system how to interpret its value.

A

Data Type

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

Specifies the size and
type of variable values, and it has no additional methods.

A

Primitive data types

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

Are called reference types because they refer to objects.

A

Non-primitive data types

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

Can store whole numbers from -128 to 127.

A

Byte

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

Can store whole numbers from -32768 to 32767

A

Short

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

Can store whole numbers from
-2147483648 to 2147483647.

A

Int

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

Can store whole numbers from -
9223372036854775808 to 9223372036854775807.

A

Long

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

Can store fractional numbers from 3.4e−038 to 3.4e+038. Note that you should end the value with an
“f”:

A

Float

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

Can store fractional numbers from
1.7e−308 to 1.7e+308.

A

Double

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

Can only take the values true or false:

A

Booleans

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

Used to store a single character. The character must be surrounded by single quotes, like ‘A’ or ‘c’:

A

Characters

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

Is used to store a sequence of
characters (text).

A

String

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

Any constant value which can be assigned to the variable

A

Literal/Constant

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

Used to represent a decimal, binary, or hexadecimal value.

A

Integer Literals

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

Composed of a sequence of decimal digits followed by either a decimal fraction, a decimal
exponent, or both.

A

Floating-point Literals

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

Have only two values, true or false.

A

Boolean literals

17
Q

Represented as a single character
surrounded by single quotes.

A

Character Literals

18
Q

Represent multiple characters and are enclosed
by double quotes.

A

String Literals

19
Q

A name which is associated with a value that can be changed.

A

Variables

20
Q

Constitute the basic building block to any programming language.

A

Operators

21
Q

Are used in mathematical expressions in the same way that they are used in algebra.

A

Arithmetic Operators

22
Q

Also known as Comparison Operators are used to check for relations like equality, greater than, less than. They return Boolean result after the comparison.

A

Relational
Operators

23
Q

Also known as Logical Operators are used to perform logical “AND”, “OR” and “NOT” operation, i.e. the function similar to AND gate and OR gate in digital electronics.

A

Boolean Operators

24
Q

Used to assign values to a variable. The left side operand is a variable and the right side operand of the assignment operator is a value.

A

Assignment Operators