The Best Way to Learn Java

The Best Way to Learn Java
You all must be aware of the fact that the first step towards learning something new involves finding out the best possible way in which to begin. This can be quite a difficult and time consuming task and often becomes the deciding factor with regards to whether or not you continue with your pursuit.

You may have found hundreds of free java learning resources around the web and have observed many different opinion about dozens of frameworks.

Finally, if you have decided to learn Java programming language, at first, you might not be clear on where to start. This is where this article will come to your rescue. It will take you through various, time tested approaches, through which, you can learn Java in the most effective manner.

Step 1: Make Up Your Mind – Ignore the Critics

Not every person loves Java programming and hence, they will try their level best to deter you from learning the language. It is true that the world of programming is flooded with different competing languages and it is not really possible to pick the one which is the best. A language which works perfectly for you might not serve the same purpose for someone else.

Hence, instead of paying attention to what the critics of Java have to say, you must focus all your attention on learning the language you picked.


Step 2: Install Java and Eclipse IDE

Although, it is very much possible to learn Java simply by installing the Java SDK but the learning curve in this case is bound to be real slow. When Java SDK is combined with an IDE, it provides for an integrated development environment which will take care of all your needs and will help you learn quickly and more effectively. And among the different IDEs, Eclipse is undoubtedly the best and can be downloaded for free.

Steps to install Java SDK


- Go to Java Download Page
- Click on Download "JDK".

Steps to install Eclipse

- Go to Eclipse Download Page
- Download "Eclipse IDE for Java EE Developers"
- Unzip the downloaded zip file in a folder. This should create a folder structure.

Step 3: Learn Java Fundamentals


The most logical way in which you can start learning Java is to start with the fundamental concepts. In order to learn the basics of this programming language, you can make use of a free tutorial or can simply download a good e-book. The whole idea is to understand what core Java is all about before moving on to the advanced levels.

Some of the key concepts you must learn are

  • Object Oriented Programming Concepts including encapsulation, abstraction, inheritance, containment and polymorphism.
  • Why Java is Platform Independent? Why it can be easily run on all operating systems like Unix, Windows or Mac?
  • What is Java Virtual Machine? How Java Virtual Machine works?
  • Understanding of Java Collection framework
  • Good understanding of data types and few java.lang classes like String, Math, System, java.io stream concepts etc.


Step 4: Read Some Good Books from Experts

Although, the online e-books as well as tutorials will help you learn Java in a very effective manner, looking at the language from the point of view of an expert will help you a great deal. For this, start reading books which have been penned down by expert Java programmers and professionals. This will help you gain an insight on the process of coding, as is done by experienced programmers.

My choice of Free book is Thinking in Java

You can also buy a printed copy of Thinking in Java on amazon. In case you are looking for different good options, here are few awesome java books that I recommend.


Step 5: Start Creating a Simple Application Using Your Knowledge

Learning only the theoretical concepts of Java will not help you become a programming expert. For this, you will be required to put the theory into practice as well. So, make use of the knowledge acquired by you and start creating a simple application. You can go for some simple coding exercises which will keep your motivation levels high.

By simple I do not mean a “Hello World”. I would recommend some exercises like below

Try some logic exercises like

  • Compute factorial of a number.
  • Create a Fibonacci series.
  • Find all prime numbers between 1 to 1000
  • Print number in word (e.g. 123 = One Hundred Twenty Three)

Try file input/output exercises like

  • Read a file and display its content on console.
  • List all files in a directory.
  • Create a file with some content.
  • Read input from user on console.

Try String manipulation exercises like

  • find a string in large text.
  • replace a part of string
  • parse numbers from strings

You can find out few more exercises at Java Basic Exercise

Step 6: Go Next Level – Simple is not Enough

Once you are through with basic Java coding exercises and have gained a comfort level in the usage of this language, you can move on to the next level and start creating programs and applications which require more complex and advanced levels of programming. By doing this, you will get a good exposure of the real life complexity that a programmer faces.

At this level, I would recommend some exercises like below

  • Build a number pyramid of any size based on input size.
  • Try creating a small text based 2 player game (like Tic Tac Toe)
  • Add a twist to the Tic Tac Toe with a Computer player option, where the computer can make one move and second player is human. You will easily be able to figure out the strategy to win this game by now :)


Step 7: Learn Servlets and JSP

A web application is basically a dynamic extension of the application server or web. The introduction of Java EE 6 has resulted in a lot of improvement over the previous versions, in terms of adding good standard APIs like servlets and JSP. Learning these additional APIs will help you venture into new things and integrate your Java programming with additional frameworks and tools.

Once you understand servlets and JSPs thoroughly, I would recommend some exercises like below

  • Build a application to capture user details in a form, save the form detail in MySQL database using JDBC.
  • Build a simple web based Tic Tac Toe game that two players can play.
  • Add authentication to the above game with allowing only users with username/password.


Step 8: Learn JSF

JSF or JavaServer Faces is basically a web framework which helps in the simplification of user interfaces when it comes to Java web applications. This is done through the assembly of reusable components within a page. Additionally, it comes with many popular functions like manipulating and accessing components through tag libraries, automatic saving of form data along with its re-population on getting displayed at the client side.

Once you understand JSF thoroughly, I would recommend some exercises like below

  • Build a simple web based chatting application
  • Build a simple shopping cart application


Step 9: Build an Awesome Web Application

These may be of two different types, namely, presentation oriented or service oriented. Depending upon what you want, create an awesome web application by making use of web components you have learned so far.

At this point, I would also recommend you to start looking into some of good JSF frameworks like below, each of them may be a good fit for different needs.


Step 10: Continue Learning and keep up with the Latest Trends

Finally, if you are a programmer, you cannot really get away with learning. This is because there is absolutely no place for obsolete professional skills in the world of programming. Hence, it is very important for a Java programmer to keep up with the latest trends in order to gain a competitive edge over others. And, the best way to do this is by putting newly acquired knowledge into practice.

I recommend reading these Java and related Technology Sites and Blogs from experts


Java is a programming language which can be learned for fun and also has the potential to make you stand out as an effective programmer. Hence, depending upon where exactly you want to reach, choose a programming language which suits you the best. This article is solely based on my personal Java learning experience over a decade and hope you will be able to get benefited from my experience.

Related

Tips 7907470663603732530

Post a Comment Default Comments

  1. still I am not much aware about java but your website will help me to learn it soon
    Thnaks ..

    ReplyDelete
  2. I want be a Java Developer but I still could learn only Basic java I want to go through Advance which can make me increased in this field.

    ReplyDelete
    Replies
    1. I can see that you are putting a lots of efforts into your blog. Keep posting the good work.Some really helpful information in there. Bookmarked. Nice to see your site. Thanks!

      Delete
    2. Great info! I recently came across your blog and have been reading along. I thought I would leave my first comment. I don’t know what to say except that I have.

      Delete
  3. I am new to java but have lot of interest in this language,however i have not much knowledge how to implement collections framework for different scenario,please suggest some good links

    ReplyDelete
  4. This is something i been looking for!!!

    ReplyDelete
  5. Very Informative steps to learn java.

    ReplyDelete
  6. I am basically not a programmer and I am comparatively new to Java technology , so I was wondering what all topics should be covered up if i have to start java from the start and has any one
    studied or got any info regarding this 6 week java training online course http://www.wiziq.com/course/12145-the-6-week-complete-java-primer-with-training-certificate and should we also have knowledge of C language before we further move on to Advance Java topics??

    ReplyDelete
  7. Well, Java is a very easy to use language once u get a hold of it.... if anyone is a beginner in java then they should attend some interesting java focused conferences which gives a huge knowledge abt the language nd very interesting, easy tips nd tricks which are very useful... few of the famous java conferences are Javapolis (devox), JavaOne, and recently i received a mail from oracle regarding their JavaOne conference.. They have many interesting sessions lined up fr this year... you can take a look at their sessions related topics here: https://www.regpulse.com/javaone2013/register.php?pcode=737266&src=4002&Act=1
    I myself hoping to attend several sessions about Core Java Platform; JavaFX, Java Embedded, and Java Card and many more.

    ReplyDelete
  8. Hi sumit,
    I have no idea about this online java training course you are talking about but i have taken many other courses from http://www.wiziq.com which has worked for me . It is really cool stuff which they provide like videos,notes,cd's and also the teachers are also good. So even i was planning to learn java so now when i came across ur comment even i have enrolled in http://www.wiziq.com/course/12145-the-6-week-complete-java-primer-with-training-certificate because i have studied from this site before also so i have faith on this one...

    ReplyDelete
  9. Thanks so much for this wonderful website as well as this post. This post is the kind of thing That keeps me on track through. I've been looking around for this site after I heard about them from a buddy and was thrilled. Thanks a bunch.

    ReplyDelete
  10. very good information,thanks a ton

    ReplyDelete
  11. "Thanks so much for this wonderful website as well as this post. This post is the kind of thing that keeps me on track through. I’ve been looking around for this site after I heard about them from a buddy and was thrilled. Thanks a bunch.

    ReplyDelete
  12. The info is good, but i am confused with struts, hibernate, springs... etc.
    which one to learn 1st .... can anyone guide me....

    my email id is "starvishnu_83@yahoo.com"

    please tell me the exact learning curve.

    ReplyDelete
  13. Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts into the stuff you post!! Marbella Property

    ReplyDelete
  14. Good job! Available many articles to study but you do the best thing. Thanks a lot for sharing the amazing post. Expect your following article.

    ReplyDelete
  15. This is such a great resource that you are providing and you give it away for free. I love seeing websites that understand the value of providing a quality resource for free.Buy Facebook Fans

    ReplyDelete
  16. I am just in the beginning of the way towards Android programming and this post is very encouraging. Thanks!

    ReplyDelete
  17. I like your post. It is good to see you verbalize from the heart and clarity on this important subject can be easily observed.

    ReplyDelete
  18. Design is a funny word. Some people think design means how it looks. But of course, if you dig deeper, it's really how it works.

    ReplyDelete
  19. All articles are written by very intelligent people. And I want to share this with you. You must be mentioned here that has something for everyone.SEO Liverpool

    ReplyDelete
  20. super..
    http://www.kvnpromo.com/

    ReplyDelete
  21. found. Also becoming mildew or even rot proof, the water-resistant version is better utilized for all you choices should you reside inside a humid environment rc car shop

    ReplyDelete

Individuals who comment on FromDev at regular basis, will be rewarded in Top Commenter section. (Comments are selectively moderated so please do not spam)

emo-but-icon

item