• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Help

 
Lucky Singh
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 24212
35
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Presumably the error is inside "show".
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic