Countries

Report a typo

Given the following code:

try {
    {1}(File("test.txt")).use { scanner ->
        while ({2}.hasNext()) {
            println(scanner.nextLine())
        }
    }
} {3} (e: FileNotFoundException) {
    {4}.printStackTrace()
} 

Please match the missing parts of the code.

Match the items from left and right columns
1
2
3
4
e
Scanner
scanner
catch
___

Create a free account to access the full topic