Please select 3 correct answers
Primitive data types in Java include int, boolean, char, double, float, long, short, and byte. String and ArrayList are reference types, not primitive data types.
The first if statement checks x > 5 and prints "A" since the condition is true.
The second if checks x < 20, which is true, so it prints "B". The else block is skipped because the if condition is true.
The loop runs as long as i < 5. Starting from i = 0 and incrementing by 1 each time, it will run for i = 0, 1, 2, 3, 4, which is 5 iterations.
The method substring(2) returns the substring starting from index 2 up to the end of the string. In "APCSA", characters start at index 0: A = index 0, P = index 1, C = index 2, so "CSA" is printed.
Please select 3 correct answers
A: Correctly initializes an array using the shorthand notation {1, 2, 3}. B: Creates an array of size 3 with default values (0 for int type). D: Explicitly declares an array with specified values using new int[]. C and E are invalid syntax.