Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
    Bookmark Topic Watch Topic
  • New Topic

Array initialization

 
Rizwan Qadri
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi, all,

How can we initialize or use this array.

class ArrayTest
{
public static void main(String[] args)
{
int[][] values =new int[2][];
System.out.println(values[1]);
}
}

Output- null
I cant understand.
 
Joe Ess
Bartender
Posts: 9312
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.
 
    Bookmark Topic Watch Topic
  • New Topic