This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Array initialization Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic
Author

Array initialization

Rizwan Qadri
Ranch Hand

Joined: May 28, 2007
Posts: 40
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

Joined: Oct 29, 2001
Posts: 8877
    
    8

Please don't post the same question more than once. It causes confusion and duplication of effort as the community tries to help everyone.


"blabbing like a narcissistic fool with a superiority complex" ~ N.A.
[How To Ask Questions On JavaRanch]
 
 
subject: Array initialization