| | |
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 |
Tag cloud for Java
addressbook android api apple applet application arguments array arrays automation binary bluetooth button calculator chat class classes client code columns component converter database draw eclipse error errors event exception file fractal ftp game givemetehcodez graphics gridlayout gui helpwithhomework html ide image inetaddress input integer j2me japplet java javaprojects jme jmf jni jpanel julia link linux list loop map method methods midlethttpconnection mobile netbeans newbie number objects openjavafx oracle php print problem program programming project projects recursion rim scanner screen server set signing size smart sms socket sort sql storm string support swing test threads time tree unlimited variablebinding webservices windows






