This means that programs are not limited to computing numbers, strings of
characters, etc. Programs can also compute automobiles, factory orders, concert schedules, etc. directly.
If this sounds magical, wait to read more in the classes and objects section coming later in this chapter.
Rest assured that, in the end, it all boils down to bits (1s and 0s) in the computer. Object orientation is just
a different way of naming and thinking about what??™s going on in the computer, and it??™s helpful because it usually
makes thinking about the computation more natural. Also, object orientation often leads to software that is more
easily used for multiple purposes, thus constantly expanding our resource of useful, tested programs.
But Java programmers need some basic data types to get started. These Java primitive types are not objects,
but are simply the definitions of the varieties of data with which all Java programs can work. The primitive types
fall into three categories:
1 integral types integers and characters
2 floating-point types fractional numbers
3 boolean type true or false values
It may seem strange to call characters one of the integral types, but the reason is that each character is
represented by an integer value.
Pages:
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189