| Author |
Problem referencing array from another class
|
Parka Teoh
Ranch Hand
Joined: Aug 28, 2004
Posts: 40
|
|
I have an array in a jdbc class file. But I can't reference it in another class file in the same package. Here's my jdbc connection class code and further down (in the same file )I have in another file called file2.java, I tried to reference the array in the above file using the following... I've got null printed. I don't know what I've missed... [ October 17, 2004: Message edited by: Parka Teoh ] [ October 17, 2004: Message edited by: Parka Teoh ]
|
Do you have a parka?<br /> <br /><a href="http://sg.geocities.com/inschooool" target="_blank" rel="nofollow">Visit my homepage</a> | <a href="http://parka.deviantart.com/" target="_blank" rel="nofollow">Parka Deviantart gallery</a>
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Parka, Is the System.out.println() writing at least once? Maybe the query isn't returning any data.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
Parka Teoh
Ranch Hand
Joined: Aug 28, 2004
Posts: 40
|
|
I've tried System.out.println in the connection file too. And the queries were printed out correctly. I have 9 items, and all the 9 items were displayed. But somehow when I run the other java file to reference the array from the connection file, it returns null. hmmm...
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26192
|
|
Parka, Since we've established this isn't a JDBC problem, I'm moving it to Java In General. The people who hang out there know a lot about the language itself and can be more helpful.
|
 |
 |
|
|
subject: Problem referencing array from another class
|
|
|