Main image of article Java Learners: Common Mistakes You'll Make

Having fun while tinkering with technology is a good approach to learning Java. However, it doesn’t prevent you from making the typical mistakes most newbie programmers do. And that’s what I want to talk about in this article: The common issues most Java learners face, as well as tips on how to avoid them.

Practice makes perfect — as does admitting and correcting your mistakes.

Learning with No Certain Goal

Learning without a clear purpose will sooner or later turn out to be just a waste of time. This comes from the lack of understanding of what you actually want and where your interests lie, which is very likely to lead to loss of motivation.

You may be adding every new book or website you come across onto your “must learn” list and trying to use them all at once; but focusing on only one thing would be more productive. If you don’t have a good study plan, you’ll most likely find yourself buried deep in a pile of information.

Tip #1

Single out the areas you need to work on, one at a time. Then, create a detailed study plan including your next steps, the skills you need to master, and resources you will be using. This way, you will have a clear understanding of where you are heading and how to achieve that goal.

Tip #2

Figure out what you want to use Java for. Java applies to many different goals and purposes, from creating Android and web apps to QA Automation, so find one you can focus on.

Diving Headfirst into Theory and Avoiding Practice

There’s no doubt that theory matters, but it won’t get you far if you don’t know how to apply the knowledge. Practicing, on the other hand, gives you examples no books can: You get the first-hand experience and real-life examples, which are by far the best teachers you can have. 

Tip #1

Surely you want your code to be perfect, but that’s not quite possible when you are just taking your first steps in learning Java. Don’t wait for months before writing your first code: Start small to build up your prowess. And courage.

Tip #2

Practice is key to mastering virtually anything, so start coding along with watching video tutorials, even if you’re just repeating the code in a tutorial.

Tip #3

Another useful thing you can do is to start an online course. Here are a few:

  • Codegym
    Codegym offers an online Java course that is 80 percent based on practice. Here you will find 1,200 tasks that increase in complexity and will be checked by an online mentor within seconds.
  • CodinGame
    As its name implies, CodinGame offers an opportunity to learn and practice alongside having fun and solving challenges in over 25 languages, from Java to Python.
  • GeeksforGeeks
    This portal was created by programming enthusiasts for their fellow coders, and offers multiple paid and free online courses teaching fundamental and more advanced skills based on practice.

Lack of Persistence

Think about children learning how to speak or walk: They practice every single day (even though they do it unintentionally). If they tried walking once a week, would they succeed? Probably not. If you try coding once a week, there’s very little chance you will succeed; you only waste time if you’re learning and practicing once in a blue moon.

Tip #1

Make yourself a schedule and follow it. Knowing how many pages you should read and what code you should write on a certain day makes your studies more systematic. Courses could be helpful, as they offer a clear agenda of what (and when) you should do.

Not Testing Your Solutions

If you’ve already started writing code, that’s great. But it’s still not enough if you don’t check what you are doing thoroughly, asking yourself questions, and testing your code, fixing bugs and testing once again.

Admitting mistakes is hard, and yet it helps develop skills and improve your code.

Tip #1

Testing your code properly is something you should learn alongside coding. You can find some help on how to do that at the following online resources:

  • Tutorialspoint
    Tutorialspoint provides over 40 tutorials for both low and high-level programming languages, along with helpful videos and online tutors.
  • W3schools
    Here you can find a great variety of tutorials on Java, Python, JavaScript, and many more. Additionally, there are practical tasks and quizzes.
  • javaTpoint
    This resource offers a growing library of tutorials that cover various programming languages such as Java, Python, PHP, C++, etc.

Neglecting the Importance of Readable Code

As a beginner, you probably care more about whether your code is actually working; but whether it can be understood often gets overlooked. If you can’t read it, your co-workers probably won’t, either.

Tip #1

Work on your optimization skills now, so you don’t have to wrack your brain to “decrypt” your code in the future.

Not Asking for Help

Studying independently is certainly a good thing, but it can play a trick on you if you stay all alone while learning how to code. If you don’t solve the issues you have with the code now (or get answers to theory questions), they will pop up later anyway.

Tip #1

Go online, visit forums, and communicate with fellow programmers. There is no shame in asking a simple and seemingly silly question, as it will benefit your learning. There are several platforms where you can find peers ready to help you with your issues:

  • Oracle Java Community
    Expert and newbie programmers from all over the world share their questions and solutions here.
  • JavaWorld
    This website features blogs giving tips for pros and beginners in programming.
  • CodeGym Help
    An online forum for Java learners where you can ask questions about the language or find help with coding tasks.

Trying to Memorize the Code

Learning to code is very much like learning a new language. There’s no use in memorizing bits of code without comprehending their meaning. Googling whatever code you need for reference is more fruitful than trying to memorize the code if you don’t even know how it operates. And no, it has nothing to do with cheating (unless you use snippets blindly).

Tip #1

Use already existing code, but don’t forget to first understand what it’s for. Take your time, figure out the way it works, test it thoroughly. The following resources can be used as a reference guide:

  • Stack Overflow
    Here you can learn something new from fellow programmers and get your questions answered.
  • Coderanch
    The platform created for programmers to discuss the most heated topics, ask for advice and find solutions.

Comparing Yourself to Others

Don’t compare yourself to others, only the previous you — that phrase has been circling around in the self-help guides for quite some time. And it’s true. Thinking, “This guy can code better than I do” won’t help you acquire actual skills. There will always be someone who is faster and more efficient, but that’s no reason to give up.

Tip #1

Instead of thinking of those better than you, think of what you can improve in your skills and what can help you grow. Is it lack of motivation? Go for small victories. Set aside the topic you find too complicated and concentrate on something more doable.

Tip #2

Focus on yourself. Ask yourself questions and give sincere answers, whether you like them or not. Being honest with yourself and trusting your own judgment are true ways to success.

Wrap Up: Your Java Journey

When you’re just starting to learn Java, some things may seem too complicated, sometimes even impossible. Mistakes are absolutely inevitable and also a natural part of the learning process; this is an opportunity to improve the skills you already have. Therefore, keep going even if some things go wrong.

Acknowledging and resolving your mistakes will help you grow. Address each of yours, find the core, and work out the right solution for you. Don’t be afraid to ask for help when necessary—and never forget that learning can be fun with the right attitude to the process.

John Selawsky is a senior Java developer as well as a Java Tutor at Learning Tree International.