Accenture Java Programming Practice Question
Determine the output public class Trial { public static void main(String[] args) { int arr[4]={}; System.out.print(arr[0]); } }Answer options
A
Compile time error
B
Garbage error
C
0
D
Runtime error int arr[4] is syntactically wrong
Correct answer: Compile time error
Explanation
Correct answer: Compile time error.