Skip to main content
Logo image

Java, Java, Java: Object-Oriented Problem Solving, 2022E

Section 0.7 Why Java?

Originally named “Oak” after a tree outside the office of its developer, James Goslin, Java was initially designed by Sun Microsystems in 1991 as a language for embedding programs into electronic consumer devices, such as microwave ovens and home security systems.
However, the tremendous popularity of the Internet and the World Wide Web (WWW) led Sun to recast Java as a language for embedding programs into Web-based applications. As you recall, the Internet is a global computer network, and the WWW is an application that provides multimedia access to a vast range of information. Java has become one of the most important languages for Web and Internet applications.
Today Java is one of the most widely used programming languages, particularly for Web-based client-sever applications.
Java has been designed with a number of interesting features:
  • Java is object oriented. Object-oriented languages divide programs into separate modules, called objects, that encapsulate the program’s data and operations. Thus, object-oriented programming (OOP) and object-oriented design (OOD) refer to a particular way of organizing programs, one which is rapidly emerging as the preferred approach for building complex software systems.
    Unlike the C++ language, in which object-oriented features were grafted onto the C language, Java was designed from scratch as an object-oriented language.
  • Java is robust, meaning that errors in Java programs don’t cause system crashes as often as errors in other programming languages. Certain features of the language enable many potential errors to be detected before a program is run.
  • Java is platform independent. A platform, in this context, is just a particular kind of computer system, such as a Macintosh or Windows system. Java’s trademark is
    “Write once, run anywhere.” This means that a Java program can be run without changes on different kinds of computers. This is not true for other high-level programming languages. The portability — of Java programs is well suited for WWW applications.
  • Java is a distributed language, which means that its programs can be designed to run on computer networks. In addition to the language itself, Java comes with an extensive collection of code libraries—software that has been designed to be used directly for particular types of applications—that make it particularly easy to build software systems for the Internet and the WWW.
  • Java is a secure language. Designed to be used on networks, Java contains features that protect against untrusted code—code that might introduce a virus or corrupt your system in some way.
Despite this list of attractive features, perhaps the best reason for choosing Java as an introductory programming language is its potential for enabling beginning programmers to create graphically based games and other applications. Its easily accessible libraries bring such accomplishments within reach of the most novice programmers.
In this book we will work on projects that involve games and puzzles, starting with simple examples and eventually learning how to build interactive GUI-based games that can be played by multiple players over the Internet.
You have attempted of activities on this page.