110CT: Lecture 4a Portfolio Questions 2006-7
|
In exercise 3.1 (Barnes & Kolling ex 1.26) you explored Java's 8 predefined primitive data types. Also, in previous work you've encountered the mathematical operators '+', '-', '/' and '*'. The exercises here explore some issues when using these operators with various data types. To help with this you'll find it useful to first explore BlueJ's CodePad facility. (The CodePad experiments are not needed for your Portfolio.)
|
|
|
||
|
||
If you need it, there's more information on using CodePad in BlueJ's tutorial (chapter 6).
You may want to use Barnes and Kolling Appendix D to help with these questions.
It may help you to be aware that in Java the default data type for integer values (whole numbers) is
|
Last modified: 3 Nov 2006
Webpage: © Lisa Payne, Coventry University, 2006
Exercises and projects: © Barnes and Kolling