19.09.2015 Views

Prentice.Hall.Introduction.to.Java.Programming,.Brief.Version.9th.(2014).[sharethefiles.com]

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

14 Chapter 1 <strong>Introduction</strong> <strong>to</strong> Computers, Programs, and <strong>Java</strong><br />

applet<br />

HTML<br />

<strong>Java</strong> initially became attractive because <strong>Java</strong> programs can be run from a Web browser.<br />

Such programs are called applets. Applets employ a modern graphical interface with but<strong>to</strong>ns,<br />

text fields, text areas, radio but<strong>to</strong>ns, and so on, <strong>to</strong> interact with users on the Web and process<br />

their requests. Applets make the Web responsive, interactive, and fun <strong>to</strong> use. Applets are<br />

embedded in an HTML file. HTML (Hypertext Markup Language) is a simple scripting language<br />

for laying out documents, linking documents on the Internet, and bringing images,<br />

sound, and video alive on the Web. Figure 1.11 shows an applet running from a Web browser<br />

for playing a tic-tac-<strong>to</strong>e game.<br />

Enter this URL from a Web browser<br />

FIGURE 1.11<br />

A <strong>Java</strong> applet for playing tic-tac-<strong>to</strong>e runs from a Web browser.<br />

Tip<br />

For a demonstration of <strong>Java</strong> applets, visit java.sun.<strong>com</strong>/applets. This site provides a rich<br />

<strong>Java</strong> resource as well as links <strong>to</strong> other cool applet demo sites.<br />

<strong>Java</strong> is now very popular for developing applications on Web servers. These applications<br />

process data, perform <strong>com</strong>putations, and generate dynamic Web pages. The LiveLab au<strong>to</strong>matic<br />

grading system, shown in Figure 1.12 and which you can use with this book, was developed<br />

using <strong>Java</strong>.<br />

<strong>Java</strong> is a versatile programming language: You can use it <strong>to</strong> develop applications for<br />

desk<strong>to</strong>p <strong>com</strong>puters, servers, and small hand-held devices. The software for Android cell<br />

phones is developed using <strong>Java</strong>. Figure 1.13 shows an emula<strong>to</strong>r for developing Android<br />

phone applications.<br />

✓Point✓ Check<br />

1.21 Who invented <strong>Java</strong>? Which <strong>com</strong>pany owns <strong>Java</strong> now?<br />

1.22 What is a <strong>Java</strong> applet?<br />

1.23 What programming language does Android use?

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!