0

public class Program { public static void main(String[] args) { int[ ] intArr = new int[6,7,5]; System.out.println(intArr.length); } }

what is the error??

5th Oct 2016, 6:40 AM
maruf msruf
maruf msruf - avatar
2 Respuestas
+ 4
The following line is correct for what you want. int[] intArr = {6,7,5}; You are initializing your array incorrectly. You don't need to put "new int". Just put curly braces with the int values you want.
5th Oct 2016, 8:10 AM
Ryne
Ryne - avatar
+ 1
{in this}
5th Oct 2016, 8:19 AM
HawkEye
HawkEye - avatar