B4J Question java.util.NoSuchElementException

schimanski

Well-Known Member
Licensed User
Longtime User
Why do i get always this exception, when I remove an key from a map with

Private Kontakte as Map
..
Kontakte.Remove(Kontakte.GetKeyAt(i))


 

Daestrum

Expert
Licensed User
Longtime User
The only way I can re-create this error is trying to remove an item beyond the end of the map.
Are you checking i < map.size as a map.size of 3 contains elements 0,1 and 2
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…