Win a copy of 97 Things Every Java Programmer Should Know this week in the Java in General forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Problem with data from DataInfo

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++)>
It prints first 3 values, After that it prints exceptions.
What will be the problem ?
Any ideas regarding this ?
Thaks in Advace
Anil Kumar Sadineni.

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).]
Bring out your dead! Or a tiny ad:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic