AP Computer Science Exam Question:
Which of the following statements correctly match the primitive data types with their corresponding names and keyword representations in Java?
A)
1. byte - Integer - int
2. short - Real - double
3. int - Character - char
4. long - Boolean - boolean
B)
1. byte - Integer - int
2. short - Real - float
3. int - Character - char
4. long - Boolean - bool
C)
1. byte - Integer - byte
2. short - Real - short
3. int - Character - char
4. long - Boolean - bool
D)
1. byte - Integer - byte
2. short - Real - double
3. int - Character - int
4. long - Boolean - boolean
Choose the correct option from A, B, C, or D.
Answer:
The correct option is A)
The correct keyword representations for the given primitive data types in Java are:
byte
short
int
long
Therefore, option A) 1. byte - Integer - int, 2. short - Real - double, 3. int - Character - char, 4. long - Boolean - boolean is correct.