Nowadays there are many resources online that offer courses and tutorials to learn how to program. However there are not many that teach you how to program in Java, therefore in this article I am going to focus on those resources that offers lessons on how to program in Java.
Home & Learn: Free Java course
Home & Learn offers an excellent free Java course for beginners. This website is full of information starting from how to set up NetBeans IDE to Methods, Classes, Arrays, Databases and Java Forms. This tutorial consists of 13 chapters and is an excellent starting point for any one who wants to begin their adventure with Java. The topics are well explained and easy to follow.
Oracle website is a place where beginners as well as experienced Java programmers can refer to. This website consists of all the information about Java Swing, JavaFX, Java SE, Java EE and Java ME. It is a great starting point as well as point of reference in any part of your journey with Java. The topics are fully and very well explained with an variety of examples. Every topic contains questions and exercises so you can test yourself.
For those who prefer audio tutorials YouTube is a good place to visit. There you can find hundreds of tutorials created by tutors, programmers, students and individuals keen in Java. There are series of lessons that you can follow or just search for specific topics. I am sure you that you will find lots of information there too.
In addition to your learning there are many free java books online waiting to be downloaded in PDF format. The variety of books ranges from beginners to advanced level of experience as well as from an overall look at Java to a specific topic.
So those above are my top 5 online resouces that will teach you Java for free. There are also other places that you can visit such as lynda.com or teamtreehouse.com that offers Java audio tutorials and many other courses for a monthly fee.