I want to read the text from a text file. In the code below, an exception occurs (that means it goes to the catch block). I put the text file in the applicati
catch
Shortest form for small text files (in Kotlin):
val reader = FileReader(path) val txt = reader.readText() reader.close()