Java Language  «Prev  Next»

Lesson 4Course exercises
Objective Find out about the course exercises.

Java Slide Show Course Project

Throughout the course you will develop applets and applications that put your newfound Java knowledge to the test. You will be asked to submit your exercises at different stages of development. Flip through the images below to see some of the programs you will be developing:

Course Projects Slide Show

1) An image is displayed in the SlideShow applet.
1) An image is displayed in the SlideShow applet.

2) Another  image is displayed as part of the SlideShow applet.
2) Another image is displayed as part of the SlideShow applet.

3) Factoid is read from a text file and displayed in the Factoid applet.
3) A factoid is read from a text file and displayed in the Factoid applet.


4) Fact or Fiction network server is started .
4) The Fact or Fiction network server is started .

5) Fact or Fiction client communicates with the server to display trivia questions and answers.
5) The Fact or Fiction client communicates with the server to display trivia questions and answers.

  1. An image is displayed in the SlideShow applet.
  2. Another image is displayed as part of the Slide Show applet.
  3. A factoid is read from a text file and displayed in the Factoid applet.
  4. The Fact or Fiction network server is started.
  5. The Fact or Fiction client communicates with the server to display trivia questions and answers.

Examining the types of Java applications

There are several types of Java applications. These types have allowed Java to flourish in a number of different areas and contributed to Java becoming a very popular programming language. Java is used to develop the following:
  1. Console and window applications
  2. Server-based web applications supported by Servlets, JSPs, JSF, and other JEE standards
  3. Applets that execute within a browser
  4. Embedded applications
  5. Componentized building blocks using JavaBeans

While a basic understanding of the types of Java applications is useful in putting Java into context, it also helps to be able to recognize the basic code for these applications. You may not completely understand all of the ins and outs of these application types, but it is useful to see simple code examples. Reading the code goes a long way towards understanding a language and a specific program. Throughout the book we will use numerous examples to illustrate and explain various aspects of Java. The basic types of Java applications are shown below by presenting short code snippets that are central to that application type.

Java Applets

A Java applet is a small application which is written in Java and delivered to users in the form of bytecode. The user launches the Java applet from a web page, and the applet is then executed within a Java Virtual Machine in a process separate from the web browser itself. A Java applet can appear in a web page, a new application window, using the appletViewer. The appletviewer command connects to the documents or resources designated by urls and displays each applet referenced by the documents in its own window. Java applets were introduced in the first version of the Java language released in 1995.


A program or application is a set of instructions targeted to solve a particular problem that can be unambiguously understood by a computer. To this end, the computer will translate the program to the language it understands, which is machine language consisting of 0s and 1s. Computers execute a program literally as it was programmed, nothing more and nothing less. Programming is the activity of writing or coding a program in a particular programming language. This is a language that has strict grammar and syntax rules, symbols, and special keywords. People who write programs are commonly referred to as programmers or application developers. The term software then refers to a set of programs within a particular business context.