| | |
null pointer exception problem
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 |
-xlint add android api applet application applications array arrays automation bank bi binary blackberry bluetooth chat class client code compile compiler component database development digit eclipse equation error event fractal freeze functiontesting game gameprogramming givemetehcodez graphics gui health html hyper ide idea image infinite input int integer j2me java javame javaprojects jetbrains jni jpanel jtable julia learningresources linux list login loop main map method methods mobile myregfun netbeans newbie nonstatic notdisplaying pearl problem program programming project qt recursion scanner screen scrollbar server set sms sort sorting spamblocker sql sqlserver string superclass swing system text-file thread threads tree variablebinding windows xor






