Chapter 2: Data


Overview

Computers process data—factual information, such as numbers, text, images, and sound—in a form that can be processed by electronic devices. That is the whole idea of computers. In this chapter, you will see how Java handles data. This chapter will cover the two most important things a program does with data:

  • Declaring

  • Assigning

Declaring and assigning are activities that we perform in the context of a compiled language such as Java. This chapter will begin by explaining what a compiled language really is. If you are already familiar with this topic, feel free to skip to the next section, "Data Types."

In the previous chapter, we looked at the SimCom virtual machine and experienced its benefits and drawbacks. SimCom was not much of a computer, but it was valuable as a learning tool. The drawbacks mostly had to do with scale: SimCom did not have enough memory or commands to do anything very interesting. In this chapter, we leave SimCom behind and discuss Java itself.

Note

Jumping into Java can be difficult if you're learning programming from the ground up. Even the simplest possible Java program uses many unfamiliar constructs, including classes, methods, arrays, access, and static code. We can't expect you to learn all these concepts before you look at a Java program. So beginning in this chapter, you will be asked to accept that certain parts of all Java programs have to be in place in order for the program to work at all. Eventually, later chapters will present everything you are being asked to accept.




Ground-Up Java
Ground-Up Java
ISBN: 0782141900
EAN: 2147483647
Year: 2005
Pages: 157
Authors: Philip Heller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net