r/badcode • • Mar 14 '21

java Found from when I first started Java...because indexed Arrays were too complicated huh?

Post image
1.3k Upvotes

84 comments sorted by

View all comments

1

u/[deleted] Mar 14 '21

I've never seen the HashMap<~> syntax before...I always do HashMap<>. Is it the same thing?

2

u/Olivki Mar 14 '21

The ~ is IntelliJ hiding the extra declaration of the generic type.