Java Reference
In-Depth Information
2
Data and
Expressions
CHAPTER OBJECTIVES
Discuss the use of character strings, concatenation, and escape
sequences.
Explore the declaration and use of variables.
Describe the Java primitive data types.
Discuss the syntax and processing of expressions.
Define the types of data conversions and the mechanisms for
accomplishing them.
Introduce the Scanner class to create interactive programs.
Explore basic graphics concepts and the techniques for drawing shapes.
Introduce the concept of a Java applet.
T his chapter explores some of the basic types of data used in a
Java program and the use of expressions to perform calculations. It
discusses the conversion of data from one type to another and how
to read input interactively from the user running a program. This
chapter also begins the Graphics Track for the topic, in which we
introduce the concepts of graphical programming, explore the rela-
tionship between Java and the Web, and delve into Java's abilities to
manipulate color and draw shapes.
57
 
 
Search WWH ::




Custom Search