You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "String.toString()" because the return value of "java.util.Iterator.next()" is null
at Test.main(Test.java:17)
Expected behavior
The code should have been rejected
Test.java:16: error: [assignment] incompatible types in assignment.
Map<String, ?> y = x.getF(); // invalid assignment
^
The text was updated successfully, but these errors were encountered:
Command
File
Actual behavior
The code passes the check, but there's a NPE
Expected behavior
The code should have been rejected
The text was updated successfully, but these errors were encountered: