Howdy all:
a question :
in Mr.dan's mock:
class A {
public static void main (String[] args) {
float a = 1; // 1
float b = 1L; // 2
float c = 1F; // 3
float d = 1.0; // 4
}
}
A compile-time error is generated at which lines?
a. 1
b. 2
c. 3
d. 4
e. None of the Above
in the line 2, "long" has 64 bits while "float" has 32, i think , assign long to float is narrow assign ,should cast it.why no error occupy? pls...