Page 5 Excercises



Match up the following.

_____ explicitly expressed values, used for assignment, comparisons, and calculations
_____ integer literal constant
_____ decimal literal constant without scientific notation
_____ decimal literal constant with scientific notation
_____ NOT the square of 15
_____ boolean literal constatns
_____ a character literal constant
_____ a literal constant for object references
_____ literal constants that may obnly be used for initialization
_____ a String literal constant
_____ the method we always use to compare String objects
_____ the operator we will never use to compare String objects
_____ why we can't uniquely assign integers to all reals (*this will not be on the test)
_____ the numeric primitives, ordered by expressibility from least to greatest
_____ assigning a more expressive data to the value of a less expressive data
_____ forcing one type of data to take on some value relative to another type of data
_____ an example of numeric promotion
_____ a example of explicit casting
_____ a conventional code between characters and numbers
_____ the ASCII number for '|'
_____ the ascii translation for 63,63,63
_____ we may be able to take advantage of promotion or casting between two object references iff this is true
_____ the ascii translation of 74,65,86,65 105,115 102,117,110 33
a) both true and false
b) ? ? ?
c) "6"
d) dobule j = (double)2;
e) byte, short, int, long, float, double
f) 6
g) one class is the ancestor (or a descendent) of the other
h) numeric promotion
i) 6e0
j) the .equals() method
k) 124
l) array initialization lists
m) explicit casting
n) literal constants
o) ASCII
p) 6.0
q) == comparison operator
r) null
s) JAVA is fun !
t) 15e2
u) double j = 2;
v) '6'
w) different sizes of infinity