2 Best Java Books for C & C++ Programmers to Learn in 2022
Core Java books by Cay S. Horstmann are the best Java books C++ programmer can read to learn Java.
Hello guys, if you are a C/C++ developer and want to learn Java and looking for the best Java books and courses then you have come to the right place. Earlier, I have shared the best Java course and books which are good for everyone but in this article, I am going to share the best books C++ developers can read to learn Java.
I can relate those beginners to myself because I have also gone through the same phase, but those days, the university textbooks are our only source to learn new things. We didn’t have broadband, and unlimited access to the Internet and eBooks was not popular at that time, but things have changed.
The good thing is now I know a couple of excellent books that can help to utilize most of his C and C++ knowledge to learn Java, like Core Java Volume 1 — Fundamentals by Cay S. Horstmann which provides a comparative analysis with C++ from time to time.
For example, if you have worked in C++ for a couple of years, then you are already familiar with the Template feature. You will find that it’s quite similar to Generic in Java, but not exactly the same.
If you have read Core Java by Cay S. Horstmann, you will learn Generics by utilizing your previous experience on the C++ Template feature because this book will tell you which feature of Generics is similar to templates in C++ and where they are different.
This is just one example; there are many features in Java which has the origin in C++ but implemented slightly differently like multiple inheritance is available in both C++ and Java, but it’s not exactly the same.
Java’s support of multiple inheritances is more granular than C++; you have multiple inheritances of type, and in Java 8, some level of behavior but not precisely the same as C++.
Another example is the concept of pass by value and pass by reference in Java, which is slightly different from C++.
In C++ term everything in Java is pass by value because you have no pointer so you cannot pass the address of a variable like you do use & operator in C++, but when you pass objects to a method, a copy of the reference (handler to the object) is passed around.
This means any modification on the same reference will be visible outside the method as well, much like it does in case you do pass by reference in C++.
There are plenty of such examples when it comes to learning Java after learning C and C++, and that’s where I think a book like Core Java by Cay S. Horstmann helps a lot.
More Java Books for experienced C++ programmers
As an experienced C++ developer, I expect you to know about the OOP concept, design patterns, SOLID design principles, multi-threading, and how to write code to implement any algorithm, how to use different data structures and using various collection classes from BOOST and C++ STL library.
When you start learning Java, you will find all these features are available and more or less in some form, like Java’s collection framework contains many Collection classes from the BOOST library.
You will also find that OOP concepts and Design Patterns are exactly the same, Polymorphism is not very different, you can both overload and override methods. All you would like to learn is what distinct feature in Java does, how different they are from C++, and how to do things in the right way in Java.
So basically a refresher course of these essential concepts in Java language will help you a lot, and that’s why I suggest the following books for experienced C++ developer learning Java for work :
A refresher course in OOP design patterns where implementation and examples are in Java. This will quickly help you to start writing an intermediate level of code in Java using your existing knowledge of these things in C++.
And, if you want more active learning, combine this book with a comprehensive course like The Complete Java Masterclass on Udemy.
The best part of this book is that it is updated with the latest Java version, which is Java 8.
If you are new to the Java world, I suggest you start using Java 8 right from the beginning because it’s designed for the modern system and allows you to better leverage the capability of multicore CPU and modern hardware.
Once you know Java and start feeling comfortable with the syntax, API, and their usage. You can start reading books mostly recommended to intermediate Java programmers, like Effective Java, Java Concurrency in Practice, Java Generics and Collections, and books about Java NIO. Combined with your experience in C++ and knowledge of application development, you will learn a lot more in a quick time.
That’s all about some of the good Java books for C and C++ programmers who want to learn Java programming. As a C, C++ Developer your Java journey is likely to be smooth and some of you might appreciate the lack of pointers as it makes your code much more readable than what it was in C++.
Still, many experienced C++ Dev might complain because of a lack of power due to no pointers.
In short, If you are coming from C and C++ background to Java and want to learn Java language and API in quick time and with a decent level of detail then you would probably benefit more from a book like Core Java Volume 1 — Fundamentals by Cay S. Horstmann and Core Java, Volume II — Advanced Features (11th Edition), who provides comparative analysis with C++ time to time.
- 5 Books to Learn Data Structure and Algorithms in Java (list)
- 7 Best Courses to learn Data Structure and Algorithms (online courses)
- 6 Books to Master Coding in Java (list)
- 20 websites to learn Coding for FREE (websites)
- 5 Books to learn Python in 2022 (books)
- 10 Best Courses to learn Python for Beginners (best python courses)
- 5 Books to Learn Java Performance tuning and Garbage collection (list)
- 7 Best Courses to learn Java Performance (online courses)
- 2 Excellent books to prepare for Oracle Java Certifications (list)
- 5 Books for preparing Programming/Coding Interviews (list)
- 10 Courses to prepare for Coding interviews (courses)
- 10 Books Every Programmer Should Read (list)
- 3 Books to Learn and Master Eclipse IDE for Java developers (list)
- 10 Free Books and Courses to learn Data Structure (books)
- Top 5 Books to learn Python for Data Science (books)
- 5 Books to learn Spring Boot and Spring Cloud (books)
- 3 Books to learn Hibernate for Java Developers (books)
Thanks for reading this article so far. If you like these Java books, then please share it with your friends and colleagues. If you have any questions or feedback, then please drop a note.
All the best with your Java journey, you can let me know if you come across any hurdle in your Java learning, and we can solve it together.
P. S. — If you like online courses and interactive learning along with reading books, then you can also check out this list of top 10 Java Courses on Medium to get the best of both worlds and learn Java quickly and better.