“Learn Java the Hard Way” is a book with tutorial videos that teaches you how to code the same way a lot of us learned as children in the 1980s: typing in short, simple programs and getting them to work.
The exercises and explanations in this book are distilled from my nearly two decades of experience teaching programming to ordinary students. Over 2,000 students have taken my classes and nine months later almost all of them knew how to code — at least a little!
If you have ever bought another Java book for “beginners” and been lost by page 10, then my book is for you.
Your book will be available as a download in PDF, Kindle (.mobi) and iPad (.epub) versions so you can read it on all of your favorite devices. Videos are DRM-free, HD-quality MP4.
Hey there! I just wanted to shoot you a quick message (all the way from The Netherlands). I’ve just finished your Java book, and it was wonderful. Seriously, thank you. Best [money] I’ve ever spent.
You really got me hooked on this programming business!Yuval Toledano
Java Programming… thank you!
I can’t thank you enough for taking the time to write Learn Java the Hard Way. I’ve always wanted to learn programming, but just never had the time or funds to go to school for it. I’ve tried various online courses, but not one of them took the time to explain why you typed what you did. All of them said “Use Eclipse!”. I haven’t finished one of them because I spent the majority of my time googling answers to my questions. I was confused and frustrated, then I found your book in a Google search.
It’s like you know what questions are going to be asked, and if the answers aren’t in the book, I can watch the videos and find them.Diane Egan
quite possibly the greatest
Thank you very much your book is quite possibly the greatest intro to programming I have ever read - I have tried and failed many times to learn programming but now I feel I can actually do this - your videos are fabulous also.Chris Hudson
Thanks for LJtHW
A week ago I started reading Learn Java the Hard Way seriously. I’d had programming experience before (with Python and bits of other languages), and was practising as a hobbyist Web Dev. [Other books] didn’t click with me; unfortunately I found that although I understood most programming concepts, the other materials were either too dry and boring or aimed at someone miles above me. I finally out of desperation resorted to your book.
This book has literally been exactly what I was looking for - simply written but well explained. I’m only up to exercise 7 but already feel like I’ve learnt a lot.Matt
Thank You for LearnJavaTheHardWay
I just wanted to thank you for your course. I have been trying to learn Java for over a year now and by far your course is the best.Matt Comstock
I’d just like to take the effort to thank you for your work writing the LJTHW book.
I “studied” and “passed” computer science about 20 years ago, and due to a bunch of circumstances didn’t end up following my then chosen career of programming. I’d always convinced myself that I would one day write a little 2D platformer game to scratch this itch, and now - with the help of your book, I am feeling like I fundamentally understand the essential basics and from there can progress to more complex subjects to achieve this goal.
You’re the lecturer I never had - I’m convinced if you had taught me the way your book is teaching me, I would have been a programmer for the last 20 years, as was my dream.Mark Campbell
Most books that claim to teach programming to “beginners” cover far too much material, far too quickly.
“Learn Java the Hard Way” covers just the basics of Java but it covers them deeply, with plenty of complete working examples and the explanations that the other books didn't even think to write down.
You won’t have a working Android app by chapter 5. But you will learn how to code, and you will understand every line of code that you are writing.
In the final chapter you’ll write a not-so-simple text-based adventure game with levels loaded from a file. You should also be able to write a text-based card game like Hearts or Spades.
Installing the Tools
You’ll learn how to install a basic text editor, which you’ll use to write your programs. You’ll also learn how to install the Java compiler, which will convert your list of instructions into a form that the computer can execute.
You’ll learn the basics of navigating the command-line in Windows, Linux or Mac OS X.
How to Compile
You’ll learn how to create, compile and run your first Java program. There's no magic here; you’ll learn and understand each step.
You’ll learn how to use variables and how to get input from the person running your program.
You’ll learn how create programs that read data from text files and that write to files, too.
You’ll learn how to make decisions with if statements so that your program can behave differently depending on input.
Repeating Things with Loops
You’ll learn how to repeat things using different types of loops, including the
whileloop, the do-while loop and the
forand foreach loops.
You’ll learn how to write functions (also called methods) to simplify commonly-repeated tasks.
You’ll learn how to combine native arrays and loops to deal with large amounts of data without having to write tons of code.
You’ll learn how to create basic records (also called objects) to make your code easier to understand.