preview

Java Programming

Decent Essays

Introduction
Java was developed by a team led by James Gosling at Sun Microsystems. Originally called Oak, it was designed in 1991 for use in embedded consumer electronic appliances. In 1995, renamed Java, it was redesigned for developing Internet applications.
Java is a full-featured, general-purpose programming language that is capable of developing robust mission-critical applications. Today, it is used not only for Web programming, but also for developing standalone applications across platforms on servers, desktops, and mobile devices. It was used to develop the code to communicate with and control the robotic rover that rolled on Mars. Many companies that once considered Java to be more hype than substance are now using it to create …show more content…

*/
Note

In addition to the two comment styles, // and /*, Java supports comments of a special type, referred to as javadoc comments. javadoc comments begin with /** and end with */. They are used for documenting classes, data, and methods. They can be extracted into an HTML file using JDK's javadoc command.

1.10.2. Reserved Words
Reserved words, or keywords, are words that have a specific meaning to the compiler and cannot be used for other purposes in the program. For example, when the compiler sees the word class, it understands that the word after class is the name for the class. Other reserved words in Listing 1.1 are public, static, and void. Their use will be introduced later in the book.
Tip

Because Java is case-sensitive, public is a reserved word, but Public is not. Nonetheless, for clarity and readability, it would be best to avoid using reserved words in other forms.

1.10.3. Modifiers
Java uses certain reserved words called modifiers that specify the properties of the data, methods, and classes and how they can be used. Examples of modifiers are public and static. Other modifiers are private, final, abstract, and protected. A public datum, method, or class can be accessed by other classes. A private datum or method cannot be accessed by other classes.
1.10.4. Statements
A statement represents an action or a sequence of actions. The statement System.out.println("Welcome to Java!"); in the program in Listing 1.1 is a statement to

Get Access