This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Help" Watch "Help" New topic
Author

Help

Lucky Singh
Ranch Hand

Joined: Jan 19, 2004
Posts: 125
What is wrong witht he following-?
public class A
{
public static void main(String args[])
{
B bb = new B();
bb.show();//////////////Null Pointer Exception
}
}
class B
{
public void show()
{
//do something.
}
}
Getting a Null Pointer Exception on marked line.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24168
    
  30

Presumably the error is inside "show".


[Jess in Action][AskingGoodQuestions]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Help
 
Similar Threads
Initialising local ref variable
Arrays
Compile Error Vs runtime Error
q from jiris.com
Threads