What to Expect in Java Application Development
Java is an object-oriented programming language that was developed by a company called Sun Microsystems and it was originally modeled after C++. It was modeled to resolve the problems of C++ to be a small, portable, robust and object-oriented program. All these features have thus made java the language of choice for the World Wide Web and java application development has thus been enriched greatly. What makes Java unique and especially suited for the web? For one thing, java application development involves creating what are called Java applets for the web. These applets are interactive and dynamic programs that run inside a web page when viewed from a java-enabled browser. Once an applet has been created, it is embedded in an HTML web page and then published on the website. Once a user accesses the web page, the applets binary code is downloaded to the users computer system and executed. It is therefore clear the wide variety of things that java can do.
Once you have been doing java application development for some time, you will discover that your classes, methods and variables can get out of control and clutter your work. It can be quite annoying to say the least. As you advance you will learn how to use modifiers. These are keywords that can be applied to methods and variable combinations within a class or to the class itself. Once you pick a style, be consistent with it throughout the classes. While modifiers are optional and are not required in a declaration, they are necessary to describe restrictions and intended use of what is being declared.
As you progress in java application development, you will also want to control visibility between class members. This means that you will want to protect a class or a class member from being referenced outside the class. However, in order to do this, you will first need to understand the fundamental relationships that exist between a method or a variable in a class to other classes in the system. By default, any method or variable is visible and can be referenced within the class it resides. But what if you want to make it visible to all other classes outside this class? It is quite simple; declare it to have public access. As a beginner you will first want the widest possible access to your classes and then narrow it as you gain more experience. In the example below the class California has been declared as public:
Public class California {
Place methods and variables here;
. . .
}
If you master the basics of java and the relationships between methods, variables and the classes that package them, java application development will be an exciting adventure.
