Hi All -- I'm using the "Complete
Java 2 Certification Study Guide", 3rd ed., by Phillip Heller and Simon Roberts, Sybex 2002. In the preparation exam for J2 Programmer, the first question is as follows:
-- In the following code fragment, what are the legal data types for the variable, answer? (Choose all that apply)
byte b = 1;
char c = 2;
short s = 3;
int i = 4;
float f= = 5f;
answer = b*c*s*i*f;
A. byte
B. char
C. short
D. int
E. float
F. double
G. long
--
The correct choices are E,F. Why is G not correct? Thanks for the advice.
[ March 10, 2005: Message edited by: Elaine Ware ]