Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

stringbuffer :nullpointerexception

 
f. nikita thomas
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey guys,



this is the first time i have used StringBuffer. if anyone is still awake ... thanks.

nikita
 
Balasubramani Dharmalingam
Ranch Hand
Posts: 116
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Variable sb is not yet initialized, default value will be null. So you are getting null pointer exception. Replace the sb declaration with following code.Then it should work
 
f. nikita thomas
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shows you how tired i am. thanks Balasubramani. namaste.
[ April 09, 2008: Message edited by: f. nikita thomas ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by f. nikita thomas:
shows you how tired i am. thanks Balasubramani. namaste.


Rest, the code will wait for you
 
f. nikita thomas
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
couldn't wait ...



unfortunately i set the bar high for myself. this will teach me some humility. but your right, enough for now. shalom.

nikita
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic