Match the types

Report a typo

Match the types of information from the stack trace message with the data from the example.

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: Index -1 out of bounds for length 0
	at java.base/java.lang.String.checkIndex(String.java:4557)
	at java.base/java.lang.StringLatin1.charAt(StringLatin1.java:46)
	at java.base/java.lang.String.charAt(String.java:1515)
	at MainKt.myPrintLn(Main.kt:9)
	at MainKt.main(Main.kt:5)
	at MainKt.main(Main.kt)
Match the items from left and right columns
Exception type
Exception thread
The reason why the exception was thrown
The method where the exception was thrown
The line number where the exception was thrown
main
myPrintLn()
StringIndexOutOfBoundsException
9
Index -1 out of bounds for length 0
___

Create a free account to access the full topic