It's not a secret anymore!
The moose likes JDBC and Relational Databases and the fly likes Getting nullpointer exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Getting nullpointer exception" Watch "Getting nullpointer exception" New topic

Getting nullpointer exception

dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53

I am getting null pointer exception at line 24..
i could not find where i am stucking up..

Paul Clapham

Joined: Oct 14, 2005
Posts: 19747

That would be because fee_master[0] is null.

Notice that you declare that "fee_master" array, at which point all of its entries are null. You don't have any code which changes that (i.e. by putting FEE_MASTER objects into the array) and so the entries are still all null when you start trying to use them.
dhaval thakor
Ranch Hand

Joined: Aug 27, 2012
Posts: 53

I would be very thankful for your answer..
Wendy Gibbons

Joined: Oct 21, 2008
Posts: 1107

I would be placing my debugging effort around the result set, I think you can only go round it once. Or maybe you don't have that column.
I agree. Here's the link:
subject: Getting nullpointer exception
It's not a secret anymore!