Skip to content

Latest commit

 

History

History
239 lines (144 loc) · 10.7 KB

File metadata and controls

239 lines (144 loc) · 10.7 KB

Zip Code Wilmington’s Introduction to Java Programming

Colophon

Zip Code Wilmington’s Introduction to Java Programming by Kristofer Younger

Copyright © 2020-2025 by Zip Code Wilmington. All Rights Reserved.

Published in the U.S.A.

June 2025: First Edition

While the publisher and author have used good faith efforts to ensure that the information and instructions contained in this work are accurate, the publisher and author disclaim all responsibility for errors or omissions, including without limitation responsibility for damages resulting from the use of or reliance on this work. Use of the information and instructions in this work is at your own risk. If any code samples or other information this work contains or describes is subject to open source licenses or the intellectual property rights of others, it is your responsibility to ensure that your use thereof complies with such licenses and/or rights.

Preface

I’d like to thank the instructors of ZipCodeWilmington for inspiring my series of programming books: Chris Nobles, Roberto DeDeus, Tyrell Hoxter, L. Dolio Durant, and Mikaila Akeredolu. Without them, this book would have remained in "maybe some day" category.

Zip Code Wilmington is a non-profit coding boot-camp in Delaware for people who wish to transform their lives by becoming proficient at coding and programming. Find out more about us at https://zipcodewilmington.com

About this book

This book’s aim is to provide you with the most basic of fundamentals regarding Java, the programming language we have been teaching at Zip Code Wilmington for more than 10 years. To someone who has spent some time with programming languages, this might be just a breezy intro to Java. If you have almost any serious coding experience, this book is probably too elementary for you. You might, however, find the ideas in the Appendices interesting.

Java: A True War Horse

Java is a moderately difficult programming language to learn, and we’re going to use it in this book to describe the basic fundamentals of coding. It is battle-tested, having been around for more than 25 years. It is used in many places, from Android apps to enterprise back-end systems.

And yet, its form is modern and it is widely used. It is still being updated and maintained and expanded. It can be used for many purposes, from web applications to back-end server processing. We’re going to use it for learning simple, programming-in-the-small, object-orientation, methods and concepts; but make no mistake - Java is a world-class language capable of amazing things.

And companies are still paying well for people who know how to use a decades-old programming language.

Coding The Hard Way.

Zed A. Shaw is a popular author of several books where he describes learning a programming language The Hard Way. Zed suggests, and we at Zip Code agree with him whole-heartedly, that the best, most impactful, highest return for your investment when learning to code, is type the code using your own fingers [1]

That’s right. Whether you are a "visual learner", a "video learner", or someone who can read textbooks like novels (are there any more of these out there?), the best way to learn to code is to code and to code by typing out the code with your own fingers. This means you DO NOT do a lot of copy and paste of code blocks; you really put in the work, making your brain better wired to code by coding with your own typing of the code.

And in the age of AI code generators (and AI tools in general), this is even more important. You must learn to think like a coder, and that means you must practice coding, not just reading about it or watching videos about it.

What AI is teaching us is that coding is not just about knowing syntax, it’s about problem solving, understanding logic, and being able to break down complex tasks into manageable pieces. AI can help with syntax and even suggest solutions, but it can’t replace the deep understanding that comes from actually writing code yourself.

You must code to become a coder

You’re here, reading this, because you’re thinking (or maybe you know) that you want to become a coder. It’s pretty straight-forward.

You may have heard a friend wistfully dream of making a career at writing. "Oh," they say, "I wish I had time to write a great novel, I want to be a writer someday".

So you can ask them: Did you write today? How many words? And the excuses flow: "Oh, I have to pick up the kids" "Ran out of time, I’m so busy at work." "I had to cut the grass" and so on. Well, I’m here to tell you that all the excuses in the world don’t stop a real writer from writing. They just sit down and do it. As often as they can, sometimes even when they can’t (or shouldn’t).

Coding, like writing, isn’t something you can do when all your other chores, obligations, and entertainments are done. If you’re serious about learning coding, you must make time for coding.

Watching hours of YouTube videos will not make you a coder.

Reading dozens of blog posts, Medium articles, and books will not make you a coder.

Following along with endless step-by-step tutorials will not make you a coder.

The only way you’re going to learn to code is by doing it. Trying to solve a problem. Making mistakes, fixing them, learning from what worked and what didn’t at the keyboard.

Many have heard my often-repeated admonition: If you coded today, you’re a coder. If not, you’re not a coder. It really is as simple as that.

Dedication to the mission

I happen to be among those who feel anyone can learn to code. It’s a 21st century superpower. When you code, you can change the world. Being proficient at coding can be a life-changing skill that impacts your life, your family’s life and your future forever. Time and time again, I’ve seen that the ability to learn to code is evenly distributed across the population, but the opportunity to learn to code is not. So, we run Zip Code to give people a shot at learning a 21st century superpower, no matter where you come from.

And fortune favors the prepared. Some day, you may be working at a great company, making a decent living, working with professionals in a great technical job. Your friends may say "You are so lucky!"

And you will think: Nope. It wasn’t luck. You’ll know that truly. You got there by preparing yourself to get there, and by working to get there, working very hard. Ain’t no luck involved, just hard work. You make your own luck by working hard.

As many know, getting a spot in a Zip Code cohort is a hard thing to do. Many try but only a few manage it. I often get asked "what can I do to prepare to get into Zip Code?"

The best way is to start solving coding problems on sites like https://hackerrank.com - HackerRank (among others) has many programming assignments, from extremely simple to very advanced. You login, and just do exercise after exercise, relieving you of one of the hardest of coding frustrations, that of trying to figure out what to code. Solving programming assignments is a good way to start to cultivate a coding mindset. Such a mindset is based on your ability to pay very close attention to detail, a desire to continually learn, and being able to stay focused on problem solving even if it takes a lot of grit and dedication.

Spending even 20 minutes a day, making progress on a programming task can make all the difference. Day after day your skills will grow, and before long you’ll look back on the early things you did and be astonished as to how simple the assignments were. You may even experience embarrassment at remembering how hard these simple exercises seemed at the time you did them. (It’s okay, we’ve all felt it. It’s part of the gig.)

Working on code every day makes you a coder. And coding everyday will help with your ability to eventually score high enough on the Zip Code admissions assessment that you get asked to group and potentially final interviews. And then, well, then you get to learn Java or Python and work yourself to exhaustion doing so. Lots and lots more hours.

Why?

You do that hard work, you put in those hours, you create lots of great code, you’ll make your own luck, and someone will be impressed and they will offer you a job. And that is the point, right? A job, doing what you love, coding. Right? RIGHT?

You’re Welcome,

-Kristofer

Ready?

Okay, let’s go.

3. Input/Output Operations

Getting things in and out of the programs you write, well, this is pretty important. Here’s a few things to use.

4. Advanced Java Concepts

These are things that are lightly covered here. These deserve a much deeper examination, as they are pretty important, but if you’re just starting to learn Java, they are not crucial.

Be sure to take a look at other Java resourses, if you need more information about them!

Appendix A: Additional Java Resources

Here are a series of other resources to go on from this point. Dev.java is a really good one.

Some Java sites for you to explore:

If you’re looking for more of a professional code tool, use an IDE like vscode: https://code.visualstudio.com (Many people use this these days.)


1. check out his terrific work: https://learncodethehardway.org