
Forgetting to add a blank
space to the end of a String
literal before concatenat-
ing a value makes the out-
put more difficult to read.
COMMON ERROR
TRAP
60 CHAPTER 2 Programming Building Blocks—Java Basics
1 /* Java data types and their values
2 your name here
3 */
4 public class DataTypeValues
5 {
6 public static void main( String [ ] args ) // required
7 {
8 // write your code here
9 }
10 }
EXAMPLE 2.5 DataTypeValues,Version 1
2.3 Programming Activity 1: Exploring Data Types
For Programming Activity 1, let’s explore the Java data types by finding and
printing their maximum and minimum values.
Open the ShellApplication.java source code shown in Example 2.1.