can you help me to understand what is happening here
it's compiles ok
String ejgStr[] = new String[][]{{null},new String[]{"a","b","c"},{new
String()}}[3] ;
Array problem
Moderator: admin
-
- Posts: 4
- Joined: Thu Jun 18, 2015 12:35 pm
- Contact:
Re: Array problem
Never mind it's create a two dimensional array and then return the [x] position
here is a more readable example
int[] eArr3 = new int[][]{{57},{1},{2},{3}}[0];
System.out.println(eArr3[0]);
here is a more readable example
int[] eArr3 = new int[][]{{57},{1},{2},{3}}[0];
System.out.println(eArr3[0]);
-
- Site Admin
- Posts: 10043
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: Array problem
The lines of code that you have mentioned above will not compile because there is one set of [] missing in the variable declaration part. It should be int[][] eArr3 or int[] eArr3[] instead of int[] eArr3.
If you like our products and services, please help us by posting your review here.
Who is online
Users browsing this forum: Bing [Bot] and 27 guests