| | |
null pointer exception problem
Please support our Java advertiser: Programming Forums - DaniWeb Sister Site
Thread Solved |
•
•
Join Date: Oct 2007
Posts: 280
Reputation:
Solved Threads: 19
Hello. I have come across a null pointer exception in my code. I understand this is got if there is no class/method/variable being referred to but in my case, I have a method in another class that is supposed to be called. However, the exception is thrown at the where I call it.. and this is the method skeleton in the class "classB"
Hope this can be helpful enough..I will post any more code if needed..
ps..Am not using actual method and class names for discretion purposes..
java Syntax (Toggle Plain Text)
classB.getVar();
java Syntax (Toggle Plain Text)
public voidgetVar(){ }
Hope this can be helpful enough..I will post any more code if needed..
ps..Am not using actual method and class names for discretion purposes..
As you've been told on Sun, "classB" is null at that point.
Java Programmer and Sun Systems Administrator
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
----------------------------------------------
Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
![]() |
Similar Threads
- null pointer exception problem (Java)
- Getting a null pointer exception when saving image to file. (Java)
- Null Pointer Exception problem (Java)
- Null pointer exception while getting other applet in the same page (Java)
- null pointer exception --- urgent (Java)
- Java Null Pointer Exception (Java)
- help with sort using Calendar class getting null pointer exception (Java)
Other Threads in the Java Forum
- Previous Thread: Fast Lookups for Mobile Number Prefixes.
- Next Thread: Class.forName(String ClassName) throwing ClassNotFoundException
| Thread Tools | Search this Thread |
android api applet application apps array arrays automation awt bidirectional binary birt bluetooth busy_handler(null) card chat class classes client code columns component constructor database designadrawingapplicationusingjavajslider draw eclipse editor error errors event eventlistener exception expand fractal game givemetehcodez graphics gui guidancer html ide image inetaddress input integer intellij j2me java javamicroeditionuseofmotionsensor javaprojects jme jni jpanel jtree julia linux list loop map method methods mobile mobiledevelopmentcreatejar myaggfun netbeans newbie oracle parsing plazmic print problem program programming project recursion scanner screen server set sharepoint size smart sms smsspam sort sortedmaps sql string subclass support swing textfield threads time tree unlimited utility webservices windows






