• Post Reply Bookmark Topic Watch Topic
  • New Topic

dynamic array

 
ramesh kancherla
Ranch Hand
Posts: 124
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i am creating dynamic array

I got null pointer exception


String [][] a = null ;
a[0][0]="hi";

how can i create dynamic array
 
Campbell Ritchie
Marshal
Posts: 52581
119
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What's a dynamic array?

You have initialised your array to null and tried to use it. No wonder you have a NullPointerException.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!