r/learnprogramming • u/tempyreddity • Dec 03 '15
PSA: Don't use the Java standard library
Hey guys,
So I was working through an advent of code challenge, and it looks like apparently there are issues that can arise from the java standard library, in particular hashset. See here: https://www.reddit.com/r/adventofcode/comments/3v8roh/day_3_solutions/cxlfuvp?context=3
I'm a newbie so I thought others would want to know about this before trying to figure out why their programs aren't working. Write your own classes!
0
Upvotes
View all comments
Show parent comment
-7
u/tempyreddity Dec 03 '15 edited Dec 03 '15
I thought so at first, but someone else also said the same thing. I'm thinking it could also maybe be a problem with my OS (using mac which was not optimized for Java maybe?) or cpu, etc. I know for sure it's an error with HashSet, because when I used one type of input (a Point) it gave me 2000 as an answer, and when I used another type of object, it gave me over 8000.