Check the code

Report a typo

Look at the code below:

val scanner = Scanner(System.`in`)
var num = 9;
scanner.use {
    num = scanner.nextInt()
}
println(num)

var writer = FileWriter("song.txt")
writer.use {
    writer.write("hello")
}
writer.write("can you hear me?")

Choose the correct statements about the code.

Select one or more options from the list
___

Create a free account to access the full topic