Stack trace message

Report a typo

Match the types of information from the stack trace message with examples.

Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.length()" because "str" is null
	at ExceptionDemo.main(ExceptionDemo.java:8)
Match the items from left and right columns
Exception type
Exception thread
The reason why an exception was thrown
The method where an exception was thrown
The line number where an exception was thrown
Invoking length() method for a null value String
main(String[] args)
main
8
NullPointerException
___

Create a free account to access the full topic