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

How basic can you get.....  RSS feed

 
Glenn Grieb
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the easiest way to take a string called 'outputString' and put it in a file called 'outputFile'. How do I open the file (it already exists), write and close? Thanks.
Glenn
 
Jon Dornback
Ranch Hand
Posts: 137
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure to import java.io.* in your class.
 
Glenn Grieb
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Jon, that was exactly what I needed!
Glenn
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!