Chapter 3-3 Flashcards

1
Q

Two types of data types in Java

A
  1. Primitive data types
  2. Non-primitive data types
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

include boolean, char,
byte, short, int, long, float and double.

A

Primitive data types

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

include
Classes, Interfaces, and Arrays.

A

Non-primitive data types

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

Primitive data types:

A

a) Boolean data type
b) Byte Data Type
c) Short Data Type
d) Int Data Type
e) Long Data Type
f) Float Data Type
g) Double Data Type
h) Char Data Type

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

This data type is used for simple flags that track true/false conditions

A

Boolean data type

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

is used to save memory in large arrays where the memory
savings is most required.
It is an 8-bit signed two’s complement integer. Its value-range lies between -128 to
127 (inclusive).

A

Byte Data Type

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

is a 16-bit signed two’s complement integer. Its value-range lies
between -32,768 to 32,767 (inclusive).

A

Short Data Type

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

is generally used as a default data type for integral values unless if
there is no problem about memory.
is a 32-bit signed two’s complement integer

A

Int Data Type

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

is a 64-bit two’s complement integer.
is used when you need a range of values
more than those provided by int.

A

Long Data Type

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

is a single-precision 32-bit IEEE 754 floating point.
It is recommended to use a float (instead of double) if you need to save memory in
large arrays of floating point numbers.

A

Float Data Type

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

is a double-precision 64-bit IEEE 754 floating point.
is generally used for decimal values just like float

A

Double Data Type

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

is a single 16-bit Unicode character.
is used to store characters.

A

Char Data Type

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