I'm in college. Basically I have already learnt the syntax of java from books and have been programming in java for two years (Not every other day of course, because it's a computer science and not software engineering course). However, I find myself lacking sufficient knowledge of java and feel inadequate.
For example, none of the books taught me that if I override the Object equals method, then I should override the hashCode method as well (if I want the hash containers to work properly). It was only when I couldn't get my program to run as expected and having to debug that I discovered this. I find this unproductive because I felt that it's something that should have been taught, something that should have been known in the first place. I expect that as I do more programming in java I'll run into similar "should have known" kind of problems, so I would just like to pre-empt it by learning more.
Perhaps I have been reading the wrong books, so can you point me to some good java books to read. Or is it the case that books are just to teach you the syntax, while the intricacies of java and the API should just be discovered the hard way. Or I should just read the entire API (granted the API mentions "Note that it is generally necessary to override the hashCode method whenever this method is overridden, so as to maintain the general contract for the hashCode method, which states that equal objects must have equal hash codes.") and I admit that I didn't read it the first time round.