Best programming book for beginners struggling with Java
Who this book is for?
Are you a Computer Science student who has not yet had their ‘aha’ moment in programming?
Are you having trouble building logic for programs?
Do you keep totally forgetting the concepts you learnt few months ago?
Are you someone who have tried to learn programming from video courses and online tutorials and failed?
Do you also feel that programming is not your forte?
If that is the case, then I have a book recommendation for you. This book is not just for specific programming language.
Why should you listen to my recommendations?
- I am not a programming guru. Instead I am still learning. So I remember the struggles of a learner.
- I overcame the similar things that I described above.
- I have spent over 500 hours studying this book and solving its exercises without external assistance(AI, stackoverflow etc).
The book that I recommend is Java book by Y Daniel Liang.
Do not buy this book if:
- You are considering to learn data structures.
Although this book covers implementation of various data structures, I would not recommend it to a person with sole intention of studying data structures. Instead I would supplement this book with Aaron M Tenenbaum’s Data Structures book. This is because some people might feel this book is not rigorous enough for data structures.
-
You have already solved many exercises from any programming book in any programming language. I say this because this book aims to teach programming. Not java. Java is merely a tool to teach programming concepts for this book.
-
You are trying to learn Advanced Java this book will not be the best fit for you. However I have heard good things about “Effective Java”.
-
You are searching for a book to learn advanced object oriented design concepts. This book scratches the surface of Object Oriented Programming.
-
You have extensive experience with any other programming language and you are transitioning to Java.
Organization of the book
The book is organized into five different categories.
- Fundamentals of programming
- Object-oriented programming
- GUI programming
- Data structures and algorithms
- Advanced Java programming
In my experience, the first section of the book is extremely worthy. It covers basic programming fundamentals that can be applied to any programming language. It does not matter whether you are studying Java or C or Python, the concepts learnt in these chapters are invaluable to all. The main crux of this book are its exercises. I solved almost all of those exercises and without any external assistance. And that helped me greatly. I would not skip a problem in the first section just because I could not solve it in 1 hour or so. You should sometimes be ready to spend days on same problem. This is specially true when you are just beginning to learn programming.
The second section of the book leaves a lot to be desired. Exception handling chapter of this section is really well written. I personally felt the exercises did not live up to the earlier mark set by the book itself.
The third section on GUI programming teaches JavaFX. The exercises are solid. And you will learn a lot if you persist with it. However, author does not think it is important to do stuffs in OOP way in this chapter. That is what I felt and did not like.
The fourth section on data structures and algorithms covers materials for a first course in data structures and algorithms. It is not “rigorous enough” like some classics in the field like Aaron M. Tenenbaum,Yedidyah Langsam,Moshe J. Augenstein Data Structures. Do not skip this book just because you cannot find a Java edition. This is a very well written and extremely rigorous book. It is a book I wish I studied when I started learning data structures and algorithms in university.
The fifth section covers some JDBC programming, multithreading, network programming etc. I will not buy this book just to learn this part. I would take it as a bonus instead.
Cost
The book is a significant investment that your future self will thank you for. Also get the physical copy of this book. You need to have it at your study desk all the time.
See the latest price and editions for Java book by Y Daniel Liang on Amazon.
I got the Indian edition because it is the only available book where I live. If you want better print quality, go for the international edition. The edition I got was 11th edition. I suggest getting anything starting from 11th edition.
Why read a book at all?
In this era of vibe coding, why should you even care to read a book. That too a big fat textbook.
AI can write code. So if your goal is just writing code and you do not want to learn to write code then you should definitely skip this book.
Why read a programming book over youtube or udemy course?
-
The threshold skills and knowledge to publish a book is still much higher compared to a course.
-
The pedagogy of books is generally better than courses.
Why read this book by Y Daniel Liang? Why not other similar books?
Well, I would not push you towards buying this book by claiming this is the best and rest are the worst. Cay Horstmann’s Big Java Objects is also similar to this book. But I have not read it end to end. So I am unable to recommend it.
This book covers JavaFX, a technology that suprisingly has very few learning materials. Other java books(For example: Cay Horstman’s) cover a little bit dated GUI technology, Swing.
Why Java?
My reasons for choosing Java were:
-
I had tried learning JavaScript, Python, C and C++. But they never clicked with me. And I had almost “PTSD” with those languages.
-
This was the only available textbook at my local bookshop.
If my story resonates with you, I highly recommend you check out Introduction to Java Programming and Data Structures, Comprehensive Version on Amazon. It was the turning point in my programming journey.