Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.lang.OutOfMemoryError

 
Suka Hati
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what is this error all about???
 
Michael Dunn
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
often caused by a small error in your code

here's an example (printing the alphabet after your name)



name += name + (char)(x+65);//will generate 'OutOfMemory'

code should be either
name += (char)(x+65);
or
name = name + (char)(x+65);
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic