I'm looking to learn Java for work, so I'd like to either find a good book on the topic or a good website to help me learn the language. I'm pretty proficient in C, have dabbled with C++ (though at work it's mostly used as "C with exceptions"), and I know OOP well enough from writing object-oriented Python.
Given all that, I don't really need a book that introduces programming while it introduces the Java language, but also I don't want to just learn the Java syntax so that I can write Python in Java. I'd like a book similar to Accelerated C++ that introduces the fundamentals of the language as well as teaches how to think like a C++ programmer. More than just learning the syntax, I want to grok the Java ecosystem, so a book should tell me more than how the import keyword allows you to include an external library, it should help me understand questions like, "why do Java people love this reverse domain naming convention?"
A book that helps teach best practices so that I don't have to unlearn bad habits later would be ideal. One that is modern enough to include all the latest updates to the language would be a bonus, but I can probably pick that up later if I need to. I've seen Effective Java cited as a good resource to learn best practices, but it's clearly not aimed at people who still need to learn the language basics, and I'm not sure it's really designed to teach you how to think like a Java programmer.
Java language book for an experienced programmer? - Software Engineering Stack Exchange
Best resources to learn Java for programmers?
Best Fastest way to learn Java for a job?
Is Java really that bad??
Videos
Six months ago I was also looking for books to get up to speed with Java. I was also coming from a background in C++ (as well as Perl, VBA, and JavaScript) and ended up purchasing the following:
- Effective Java (2nd Edition) by Joshua Bloch
- Java Concurrency in Practice by Brian Goetz
- Java The Complete Reference by Herbert Schildt
- Core Java, Volume I--Fundamentals by Cay Horstmann and Gary Cornell
I have since developed a Java application with more than 20,000 lines of code and found that the only books that I actually used were Effective Java and Java Concurrency in Practice. For basic language questions you can quickly get the answers from the Java Tutorials or by searching questions on stackoverflow.
In the case of Effective Java, it is the right place to start. The material is so fundamental to understanding Java idioms and avoiding common pitfalls that you cannot afford not to read it from the get go.
I were in your shoes ten years ago, tried "learning" Java after heavy C++ coding from books and examples - and failed.
Then I started working for a Java company, and they gave me the task to refactor an existing system, separate the reusable background framework from the custom business logic. At that time Java reference was unique: perfectly detailed explanations for ALL the language in a well-organized structure (now it's common). So I had the lang ref and the tutorial open in a browser, read and analyzed the code, and that's all. It was not easy, but I could manage it.
I think with your experience you don't need more. A good IDE (Eclipse is my choice), the Java tutorial for the first questions, the lang ref for the actual stuff - and tons of actual Java code with a real task to solve. And the holy Google with answers to the "beginner questions moving from C to Java" in the first months (yes, everyone has that period, bad, but it goes away). It will work.
Well, the bad side: today Java is not only the language, but the tons of tools (Spring, Maven, OSGI, Apache tools, not to mention the server side stuff), configs, magic, heavy googling. But I think anyone with a sane mind will let you familiarize yourself with the language itself before throwing you in the mud. ;-)
So: instead of any book, find a friend doing Java programming (or like me, a company that works in Java), explain the situation and start working.
My 2 cents.