Showing posts with label Strange thing I learned today in java. Show all posts
Showing posts with label Strange thing I learned today in java. Show all posts

Wednesday, December 12, 2007

Strange thing I learned today in java

Strange thing I learned today [12-12-07] is
This code wont works and my yesterday productivity is spoiled by this error


System.out.println("Data 3 from Synonym table: " + rs_synonym.getString(1) );
word[3]=rs_synonym.getString(1);

and I corrected the error by,

word[3]=rs_synonym.getString(1);
System.out.println("Data 3 from Synonym table: " + word[3] );

I modified almost all the parts of the project without thinking about the following reason J

Reason:

rs_synonym.getString(1) takes value out, so again if u assign value from it to word[3] , it will be error.