Top 10 ways to learn Java

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...

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. Learn from best Java courses:

3. Learn from best books on Amazon:
  1. Head First Java
  2. Java: A Beginner’s Guide by Herbert Schildt.
  3. Java SE8 for the Really Impatient
  4. Beginning Programming with Java For Dummies
  5. Core Java Volume I
  6. Sams Teach Yourself Java
  7. Learn Java in One Day and Learn It Well
  8. Murach’s Beginning Java with Eclipse

4. 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

5. 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.

6. 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.

7. 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.
8. Learn the Java Terminology
The best way to learn Java or any language is to start at a beginner’s level. “Hello World” is a good place to start — basically all programs use this idea to illustrate the central syntax of a programming language.
Before learning to code, a person learning Java needs to understand certain terminology in this syntax: class, object, inheritance, polymorphism, abstraction, and encapsulation. A great book to look into to learn some of these aspects is Head First Java.
Use different references to understand the terminology because even though individual references might have the same definition, the explanations aren’t absolute and limited. Google has different websites that will explain the same word in different ways.
The first time you read a definition, it may feel like you are learning a language from a different planet, but the point is to become familiar with the terminology, not to master it yet.
For instance, a class is a user-defined design or sample from which items are formed. It represents the set of processes or properties that are universal to all objects of one type.
Object is a vital unit of object-oriented programming and embodies the valid entities.
An archetypal Java program produces many objects, which work together by invoking methods.
Understanding these terminologies will help you realize the components of your code and the reason behind the final structure and the formation of the code. This strong foundation and comprehension of Java will make you capable of writing the codes and enable you to thoroughly unfold the underlying meaning of any program in the language.

9. Get a Mentor (or Teach Someone Else)

The programming community is full of people who are willing to help the next generation of programmers. Hack.pledge() is one site that will connect you to a mentor, or you can sign up to mentor someone else. Even just planning to teach what you've learned can help you retain the information better.

10. Hack Someone Else's Code




When you reverse engineer someone else's code, testing each line to see how it works, you get a better understanding of the big picture. Thanks to tons of open source code, you can learn just about anything—and keep learning through the incremental-hacking cycle. Just remember to share your code back with the community if you improve on a program.

Related

Java tips 5026654862927260711

Post a Comment

emo-but-icon

Follow Us

Pages

Hot in week

item