This week's book giveaway is in the Kotlin forum.
We're giving away four copies of Kotlin in Action and have Dmitry Jemerov & Svetlana Isakova on-line!
See this thread for details.
Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

error message  RSS feed

 
Thomas Whalen
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the error message I got when running my java program that uses a nested while(){} loop:
Warning: Cannot allocate colormap entry for default background.

here is my code: I really have NO clue what I am doing wrong :/
 
Jason Menard
Sheriff
Posts: 6450
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One thing I notice is that you are checking for the value of Strings using "==" instead of equals() or equalsIgnoreCase().
You might want to change the appropriate conditionals to something like the following:
if("yes".equals(run))
while("yes".equals(run))
while("yes".equals(flag))
HTH
 
William Barnes
Ranch Hand
Posts: 1049
2
IntelliJ IDE Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure.
But don't you want to use ".equals()" instead of "=="?
 
Thomas Whalen
Ranch Hand
Posts: 123
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
At the time I didn't know that I wanted to use ".equals("foo")", but now I do It's been a while since I played with this language.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!