Jump to content

Write entire file: Difference between revisions

no edit summary
(→‎{{header|Kotlin}}: Updated example see https://github.com/dkandalov/rosettacode-kotlin for details)
No edit summary
Line 418:
(write "(Over)write a file so that it contains a string." n)
(close-output-port n)</lang>
 
=={{header|Xtend}}==
<lang xtend>
package com.rosetta.example
 
import java.io.File
import java.io.PrintStream
 
class WriteFile {
def static main( String ... args ) {
val fout = new PrintStream(new File(args.get(0)))
fout.println("Some text.")
fout.close
}
}
</lang>
 
=={{header|zkl}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.