# Learning Java

People often describe Java by comparing it to C++. In many ways, one could say it is a successor to the older programming languages. Java automatically handles the reclamation of memory (garbage collection) and has various other features that eliminate all classes of bugs. While C++ maintained compatibility with the older C language, Java can be seen as abandoning the C legacy, fully embracing the principles of object-oriented programming.
For people who may not know what object-oriented programming is, object-oriented programming can be seen as a collection of cooperating objects, as opposed to a traditional view in which a program may be seen as a collection of functions, or simply as a list of instructions to the computer. In object-oriented programming, each object is capable of receiving messages, processing data, and sending messages to other objects. Each object can be viewed as an independent little machine with a distinct role or responsibility.

## Prerequisites

You must know at least the basics of how to use a computer, and should be able to start a command line shell.
If you are new to programming then Introduction to Programming is strongly recommended.
If you already know C++ or any other Object-Oriented language, Java should be easy to pick up.

## Course Description

This course, as you may guess, should teach you everything you would want to know to become an expert Java programmer. Java is a popular and elegant language that every programmer should have in his or her bag of tricks.
If you are a beginner to programming, Java is a good place to start. If you already are fluent in any other programming languages, Java is a good way to enhance your computer vocabulary.
Note: Since this course is still under construction, you might want to check out some of these other tutorials that are quite good:
* http://docs.oracle.com/javase/tutorial/
* http://www.javacoffeebreak.com/tutorials/gettingstarted/

### Pros and Cons of Java

Pros
* is an extremely popular language
* Gaining more and more popularity, lately
* Has a rich set of standard library classes
* Has a large base of freely accessible source code
* Moderately easy to learn. Far easier if you're good with C or C++
* Java programs are often portable amongst major Operation Systems such as Linux, Windows, and Mac
* Is often very easy to decompile
Cons
* Is not as powerful as a language like C, C++, or Assembly in that it cannot easily access low-level functions such as are needed for device driver programming (This functionality is only need in specialised situations)
* Often runs too slowly on older computers to be as easily usable as a program written in a language like C or C++
* Requires a rather hefty runtime environment to run: The Java Runtime Environment (~30MB)
The Java Runtime Environment's standard library classes are extensive enough that neophytes can be confused and/or intimidated. On the other hand, they also are a tremendous resource and can save a considerable amount of time.

## Tools

* Intellij IDE -- https://www.jetbrains.com/idea/
* VSCode -- https://code.visualstudio.com/
* Eclipse IDE -- http://eclipse.org/
* BlueJ -- http://bluej.org/ (Particularly aimed at students!)
* JCreator LE version - http://jcreator.com/ (Another IDE aimed at students)
* NetBeans IDE Source Editor -- http://www.netbeans.org/

## Lessons

We are currently up to the end of Lesson 7: Inheritance. Some other lessons have information too. Note that some lessons are not completely finished and brushed up.
If you are experienced in Java, feel free to write more on these lessons, or create new ones. You can simply add some helpful hints and that will be a great contribution.

### Fundamental Language Elements

* Lesson 1: Introduction to Java
* Lesson 2: Basic Java Language
* Lesson 3: Decision Structures
* Lesson 4: Objects and Classes
* Lesson 5: Error handling
* Lesson 6: Important Java classes
* Fundamentals End: Programming tips
* Exercises: Fundamental exercises

### Intermediate Java

* Lesson 7: Inheritance
* Lesson 8: Error handling II
* Lesson 9: Classes II
* Lesson 10: Swing and AWT
* Lesson 11: Applets
* Lesson 12: File IO
* Lesson 13: Security
* Lesson 14: Networking
* Intermediate End: Clean Code in Java II
* Exercises: Intermediate Exercises

### Advanced-Intermediate Lessons

* Lesson 15: Multithreading
* Lesson 16: Networking II
* Lesson 17: Advanced Swing

### Simple Lessons for Everyone

* Lesson 18: Deployment

## Textbooks

* Java Programming

## Java related readings and learning media
### Wikipedia

* Java (programming language)
* Free Java implementations
* Java (software platform)
* Java virtual machine
* Java performance
* Java syntax
* Java applet
* Generics in Java
* Criticism of Java
* Java Class Library
* Java (software platform) (Template)

### Videos

* Java in 100 Seconds