Playing Compiler
Which of the following assignments are legal?
a. long number = 145;
b. long number = 145.0;
c. float pi = 3.14;
d. float pi = 314e-2;
e. short number = (byte) 120;
f. short number = (byte) 150;
g. byte number = 150;
h. short number = 150;
i. char letter = 123;
j. int a; int b = a = 5;
k. int a; int b = a = 5; boolean c = a = = b;
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.