Java - Arrays
Identify the error in this Java code snippet:
int[] data = new int[5]; System.out.println(data.length());
int[] data = new int[5]; System.out.println(data.length());
data.length() with parentheses, but length is a property, not a method.data.length without parentheses. Using parentheses causes a compile-time error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions