Join us at IRC!
The measure of a mans life is not how well he dies, but how well he lives.
Thursday, May 24, 2012
Navigation
Members Online
Total Online: 37
Web Spiders: 17
Guests Online: 34
Members Online: 3

Registered Members: 70190
Newest Member: CrOnUs
Latest Articles
View Thread

HellBound Hackers | Computer General | Programming

Author

java casting problem

shadow31
Member



Posts: 32
Location:
Joined: 25.11.07
Rank:
Apprentice
Posted on 16-03-10 04:18
so I have a class called "test", In another class i have created an arraylist<objects> list but it wont let me cast the test object into the arraylist. It is giving me a null.pointer.exception

so I use list.add(new test());

What am I missing or what am i doing wrong



Author

RE: java casting problem

fuser
Member



Posts: 959
Location: in front of a computer (duh)
Joined: 05.04.07
Rank:
HBH Guru
Posted on 16-03-10 09:59
well, as much as I'd like to hone my psychic powers in figuring out your problem with a basic descblockedription, it appears my powers are sadly limited, so you'll have to post the code so that I can see the problem.










Telling modern Internet users to stop whining is like telling them to stop breathing — it seems unrealistic and inhumane. Paul Lutus

catinthecpu@hotmail.com
Author

RE: java casting problem

shadow31
Member



Posts: 32
Location:
Joined: 25.11.07
Rank:
Apprentice
Posted on 16-03-10 17:54
i would but we got the problem solved. The arraylist wasn't initialized correctly



Guest
Username

Password

Remember Me


Bookmark This Page
Affiliates
Adverts

 

 

Links
By using, viewing or obtaining any information contained on this site, you agree to the disclaimer.

© HellBound Hackers 2008- 2009. Since 3rd December 2004.