HowToDoInJava

  • Python
  • Java
  • Spring Boot
  • Dark Mode
Home / Learning Resources / Best way to learn Java programming

Best way to learn Java programming

Every month many times, I am asked same question by many of my visitors (mostly beginners of course) that how to learn java. And also if I can find some time to teach java concepts ranging from core concepts e.g. object oriented principles, language keywords and syntax, to advanced concepts like multi-threading or even Spring and hibernate too. With all due respect to my fellow friends, let me say that I am already over-burdened within my personal-professional commitments. I really want to help you guys, as well as I want to learn java programming from you guys as well, but the fact is that I get very limited time after office hours, which I cannot sacrifice as I have a sweet combined family to spend some time with. Apart from family time, I spend rest of the time to write on this blog which is like passion to me and a strong medium to connect with a larger group of like-minded people.

Having said that I am writing this post dedicated to all my young (or I should say beginner) fellows who want to attain a certain level of proficiency in java technology and somewhere would like to take my advice on this. Keep in mind that if you do not like the way to learn java, I am proposing in this post, then just ignore me. Period. OR better, suggest me what you think is the better way to learn java fast or easily.

Here I am assuming the people reading this post will be, who are very new to language, so I will start by listing first thing first. Make sure you have prepared your Java development environment ready i.e. You have installed JDK/JRE and you have an IDE like Eclipse.

1) Learn the language basics

This is the first step for very obvious reason. If you don’t know the basics then you will never know either what to do next or what you are doing wrong. Initially, I do not expect from you to become the master of all java basic stuffs like keywords, core concepts or basic coding techniques. What really I expect from you is just to read all the text available in below links, even if it just doesn’t make sense to you in the first attempt. Just keep reading it.

  1. http://docs.oracle.com/javase/tutorial/java/nutsandbolts/
  2. https://www.ibm.com/developerworks/java/tutorials/j-introtojava1/

Please keep in mind that above two links are not the only links for basic knowledge. You can do a quick google search and find out many similar links.

When you are done with few links as two given above, re-read them again second time. Don’t skip any part of it. This time, things will start making more sense to you, and you will be able to connect between various concepts by yourself. If you are still not able to connect the pieces of information spread in multiple places, then keep repeating this step until you actually start relating the core concepts. Don’t worry about you are wrong or right, just relate them and better make notes. Notes will help you to measure your java learning curve.

Carefully learn object oriented programming concepts. Just like other popular programming languages, Java is also an object oriented programming language.

2) Create some small programs

Once you are confident that you are very much familiar with most basic stuffs/keywords and concepts and you can actually relate them somehow, you are welcome to second step where you will have to start building some very very basic java programs e.g. hello world, simple addition and subtraction etc.

When you are writing the programs, keep in mind that first couple of programs are going to be real tough for you. But once you are done with them you will not face similar level of difficulty in next set of programs.

You may face difficulty so much that you may not able to type in your hello world program itself, all by yourself. Don’t hesitate, open Google and search similar program. Don’t copy it using CTRL+C. Here just read the program, and type into your IDE (integrated development environment) (I suggest to use eclipse, as I find it very easy) and solve the compilation error caused by incorrect syntax you got while typing (basically I assume that you will make mistakes in lowercase/uppercase). If you are still not able to do it, then take the help of Google again. Google is your friend, just remember it.

Do it for couple of programs and remember that always try to create program by yourself first and then use Google. I am giving below a list of basic java programs which you may consider for beginning.

  • Display some text message.
  • Display a list of numbers (1 to 50) each in new line.
  • Find the max and min between two numbers.
  • Swapping between two numbers using any technique you know.
  • Build a calculator program able to add/substract/multiply and divide the numbers.
  • Create two classes (super class/sub class) and practice method overloading and overriding concepts.
  • Create some programs involving array e.g. printing output in array format in console.
  • And so on…

Above programs are just to give you a start and make you understand what I meant by basic programs. List can be longer and I will suggest you to add more items to this list and create programs for them. And remember, Google is your friend 🙂

Also use an IDE

3) Create advanced programs using Java APIs

Now when you are done with making most of the basic programs, and most importantly, you are comfortable into creating such basic programs, jump to this step. Here, I will suggest you to work hard on learning java APIs inside java collections and java IOs. Just start exploring various classes and interfaces involved into these APIs and start creating programs for them. Please note that you should always try to find an already existing API and method for doing a certain task, and you should not be creating your own logic here. Your goal is to get familiarize yourself with these APIs, so always look for a solution within these APIs only.

Again I am suggesting few basic programs you can work on to start with. Later you can include more APIs and more such programs as much as you can.

  • Taking input from console and printing it
  • Reading a file from filesystem and printing it’s content in console
  • Creating a new file and writing some data onto it
  • Reading data from a URL and do some search on it’s content
  • Store elements in a list, and then iterate over it
  • Use HashMap to store random key-value pairs and iterate over it in multiple ways
  • Create some programs for searching and sorting over collection elements
  • And so on…

The more and more programs you build at this step, you will get more and more confidence. As soon as you are good in using these APIs, jump to most important and difficult task in next section.

4) Create at least one desktop application and one web application

This step will give you the confidence which is needed to face any java interview and prove your mettle in java related discussions. Idea is simple. You just have to decide at least one java desktop/GUI application (e.g. desktop calculator), and then one web application (e.g. hospital management). And now when you have most basic knowledge at your hand, start exploring everything which you will need to build your two applications.

Ask help from experts (I will also do my bit to help you), your experienced friends, colleagues and every person you know and who can help you. Read all available good material which comes into your way when searching for solutions and simple learning the concepts. Buy some books which are related to the concepts where you are struck in. Do everything what is needed to build these application. Make them you sole objective for few days (or weeks or even months).

Let me assure you that by the time you end up completing both exercises, you will be much more confident than ever before, when it comes to java. And more importantly, it helps you to develop a habit of getting things done at every cost. This attitude is very important in long run of your career.

5) Read and participate in some good java blogs/forums

After your above four steps are completed, you will be more of a confident man who is also able to help others like you have been few month back. Find people who know less and help them in solving the problems, even if it require some amount of time of you as well. A good place for these activities can be forums like stackoverflow.com. When you start learning about mistakes others are making, it just open up your mind on various directions and improves your thought processing capabilities.

In fact, last step is like infinite loop and you should keep doing it when the time permits. You will really appreciate the results when you will realize how mature you have become.

That’s all for now on my thoughts regarding best way to learn java. If you happen to agree with me, drop a comment. If you do not agree with me, drop your suggestion. I will include your thought into main article if it’s really good.

Happy Learning !!

Share this:

  • Twitter
  • Facebook
  • LinkedIn
  • Reddit

About Lokesh Gupta

A family guy with fun loving nature. Love computers, programming and solving everyday problems. Find me on Facebook and Twitter.

Feedback, Discussion and Comments

  1. Leul Mamo

    January 2, 2020

    Jesus…. this is the best advice anyone has ever given!!!!
    Thank you and Appreciate your effort 🙂

  2. Amanda

    June 30, 2019

    This is the best guide on Java Learning. Thanks for sharing such really important information on Java.

  3. Kinjal Sharma

    April 5, 2019

    I think practical training is the best way to learn Java

  4. ayushiyer

    January 10, 2019

    Hi Mr. Lokesh Gupta! My name is Ayushiyer one of the java course beginner. I have already completed the C and C++ course last month. So I thought next to move on to Java and Data structure algorithm. My friends also asked the same question so many time to me as to how you will learn Java course without going to tutorial classes. I found your article which was well-explained and very inspirational blog thank you for this wonderful article. I decided to learn java online only…

  5. Balaji Naik

    June 14, 2018

    Hi can you please suggest me a youtube channel to easy way to learn I don’t know anything from basic itself.

  6. Srinivas

    May 29, 2018

    Hi Lokesh,

    Need to start Data Structure and Algorithms in Java. Can you suggest book or online site to get good hold on this subject.

  7. Venkat

    September 6, 2017

    In most interview they ask A to Z Questions and programs, but they give unworthy work in projects. So over period of time we will loose grip over programming and need to start from scratch to prepare for interviews. How to overcome this situation?

    • Lokesh Gupta

      September 6, 2017

      Great question. Only one advise – Keep building something of your own. Imagine some useful product idea, and work on it.

  8. pranit patil

    August 19, 2017

    hey ,
    Great article this is. As Beginner it will definitely help me to learn java.The best thing you have explained in 1st point is try to read all the text , read basics that is what important for new learner.Thanks for your awesome guide.

  9. vikash

    July 23, 2017

    i really like your inspirational blog.. it will realy help me to l e a r n JAVA

  10. N. Jean Luc

    July 19, 2017

    Wow! This is really helpful and encouraging. Thanks!

  11. Shiva

    June 27, 2017

    Thank you this is really helpful:)

  12. chris

    February 23, 2017

    thanks for the learning tips. Your blog is really help for beginners

  13. sandhya sharma

    September 7, 2016

    Really appreciate your thoughts!!

  14. suryam

    September 3, 2016

    Hey Man That Was Great…

    And For Beginners What Are the Main 5 Elements to Learn Java
    Watch This:

  15. Ramakrishna

    May 15, 2016

    Interesting. It is good that you have pointed oracle and ibm links.

  16. nhbo

    April 15, 2016

    i am in step 5. you are my idol.

    • Lokesh Gupta

      April 15, 2016

      Congratulations !! and Thanks for kind words. I also need motivation sometimes … 🙂

  17. Pavan.K

    February 27, 2016

    Thanks lokesh, for sharing the way of learning java. For every java programmer know this basic steps and don’t burtify the classes and interfaces at the initial level, people wants to understand API throughly and grab the things how the java people designed the API like that.

  18. vikas shukla

    January 15, 2016

    3) Create at least one desktop application and one web application…..this point is very imp… without developing your own web application or desktop application it’s hard to face any interview..

    • Lokesh Gupta

      January 17, 2016

      True

  19. Majid

    December 27, 2015

    thank you for your method , it’s really good .

  20. saireddy

    January 25, 2015

    really it is a nice blog boss………. such a great information about java….. thnx.

  21. joanna

    January 19, 2015

    I really like your blog, it’s very helpful and interesting! 🙂

  22. gaurav

    July 22, 2014

    good job

    • piyush vaghela

      May 7, 2019

      this is really interesting article to learn java very speedily or easily. Some time we have to pay money online to learn java.

Comments are closed on this article!

Search Tutorials

Java Learning Resources

  • 10 Life Lessons
  • Best Way to Learn Java
  • Best Java Books for Beginners
  • Big List of Java Frameworks
  • Top 10 Java Websites
  • 5 Top Online Java Courses
  • 5 Popular Java Frameworks
  • 5 Reasons to Migrate Legacy Systems

Meta Links

  • About Me
  • Contact Us
  • Privacy policy
  • Advertise
  • Guest and Sponsored Posts

Recommended Reading

  • 10 Life Lessons
  • Secure Hash Algorithms
  • How Web Servers work?
  • How Java I/O Works Internally?
  • Best Way to Learn Java
  • Java Best Practices Guide
  • Microservices Tutorial
  • REST API Tutorial
  • How to Start New Blog

Copyright © 2020 · HowToDoInjava.com · All Rights Reserved. | Sitemap

  • Java 15 New Features
  • Sealed Classes and Interfaces
  • EdDSA (Ed25519 / Ed448)