Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Manju Tcs   on May 09 In Java Category.

  
Question Answered By: Jaspreet Kapoor   on May 09

The main problem  I see is that your tableData
uses the data  array prior to data[1] being set. The
Main() constructor will be executed prior to the
setData() method. Are you seeing any exceptions thrown? It
would seem that you should get an NullPointerException
since the data[] array is not
initialized.<br><br>Another thing: it is not clear from your message whether
you know or not that Java arrays are indexed starting
from 0. Just something to keep in
mind.

Share: 

 

This Question has 6 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Whats wrong with this code? Or get search suggestion and latest updates.


Tagged: