Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Stupid question  RSS feed

 
Popescu Ion
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi everybody,
I have a stupid question. What is wrong with this program, coz i get the same answer all the time = adsdfaw , and i should get = bdsdfbw . Any ideas ? Thnx in advance.
 
Popescu Ion
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get it. Thnx anyway.
 
Rob Spoor
Sheriff
Posts: 21089
85
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please UseRealWords: "Thanks", not "Thnx".
 
James Elsey
Ranch Hand
Posts: 228
Android IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The only stupid questions are those that are never asked ;)

What your seeing is the effects of immutability (is that even a word?!).

Strings are immutable so when you give it a value, thats it, you can't change it. You would have to re-assign is or create a new string altogether
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!