Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with data from DataInfo

 
Anil Sadineni
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends,
I am facing a problem with data coming from DataInfo. Source code like this:
DataInfo tempData;
String newRec[] = new String[recSize];
After getting values, when i start printing, i m getting Some exceptions
for(int i=0;i<newRec.length;i++)>
System.out.println(newRec[i]);
It prints first 3 values, After that it prints exceptions.
What will be the problem ?
Any ideas regarding this ?
Thaks in Advace
Bye
Anil Kumar Sadineni.

 
Paul Smiley
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What are the exceptions? ArrayIndexOutOfBounds? Then you didn't declare a large enough array, or didn't initialize all members, or perhaps declared too large of an array. The best way that I've found to 'get around' these types of things is to gather everything in a vector and then convert to an array after you are done.
Is this your entire step?
for(int i=0;i System.out.println(newRec[i]);

[This message has been edited by Paul Smiley (edited March 16, 2001).]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic