Initializing your objects is an important part of coding in Java, if you care at all about managing your memory. You will also find that properly initialized object creation leads to fewer problems with bugs. This article will explain what objects are in Java, why you should initialize them, and how to accomplish the task of safely creating Java objects.
Please be aware that this tutorial assumes that you have a basic knowledge of Java terminology to begin with, and that you can already write some basic code. There is some information available for the Java novice, but if you are new to Java, and find that you are having problems following this tutorial, then you may need to spend a little bit of time with the basics of the language and then return to this tutorial once you are more familiar with the language.
Unless, of course, you can already code in C or C++, in which case you should be able to follow along with the tutorial without much of a problem. If you need to find a resource for learning the basics of Java, the author of this tutorial humbly suggests that you get it straight from the source. Sun Microsystems offers a solid basic set of lessons on Java. These are free and available online for the use of the public.
What is Java?
Java is a coding language that was released by Sun Microsystems in 1995, but initially developed by James Gosling in 1991. The language, which is based on C and C++, took a new twist on two of the languages that programmers were already very familiar with. Java was designed with more of a object orientation in mind.
Java became popular with programmers in part because of its object based focus, which allows them to focus on the actions that a specific event or occurrence will trigger in the program instead of having to draw attention to the overall framework of the program as in more traditional programming languages. Another reason it became popular is because Java is a cross platform language that can work on remote sources. It also has a high degree of scalability in the amount of security, which means that an applet can be very restrictive or very open in its security.
Since May of 2007 most of Java's code has been deemed "open source," which means that it is covered under the GNU General Public License, and is freely available for those who wish to develop using the Java language or platform. The average end user will have had the most experience with Java when they played an online game, viewed images in 3-D or used an application for chatting online.