This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Problem in appending data to array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem in appending data to array" Watch "Problem in appending data to array" New topic
Author

Problem in appending data to array

preethi balaJain
Greenhorn

Joined: Sep 01, 2009
Posts: 6
I tried to use 3 dimensional array(because i need data heirarchy).I can not able to add data to the array.I'm getting null pointer exception.Can anyone help me.Is there any other better way to do it?
Sebastian Janisch
Ranch Hand

Joined: Feb 23, 2009
Posts: 1183


The last dimension needs to be initialized too ...


JDBCSupport - An easy to use, light-weight JDBC framework -
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

preethi balaJain wrote:... I'm getting null pointer exception...

How does this compile with the incompatible types? "test_new" is declared as a 3-dimensional String array. But then a new 3-dimensional Rectangle array is created and assigned to test_new.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in appending data to array
 
Similar Threads
Popup menu not responding with mouse event
Simple Logic Question
Mousedragging not working after updating the array.
Output of this 2Dimensional array ?
simple sorting algorithm