Exercises


Note

Every chapter in this book ends with exercises that test your understanding of the material and make you think about issues raised in later chapters. The solutions are in Appendix B.

  1. A cluster of eight bytes can take on approximately 20 quintillion different values. (One quintillion is a 1 followed by 18 zeroes, or 10 to the 18th power.) Estimate the number of different values that a cluster of 16 bytes can have. Just estimate, do not count. Can you think of anything that comes in such quantities?

  2. The SimCom animated illustration is written in Java. When you run the program, how many virtual machines are at work?

  3. Write a SimCom program that adds 255 to the value in byte 31 and stores the result in byte 30. Observe the program's behavior. What do you notice?

  4. Write a SimCom program that computes the square of the value in byte 31 and stores the result in byte 30. What happens when you try to compute the square of 254?

  5. What features could be added to SimCom to make it more useful?




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