Join the IDNLearn.com community and start finding the answers you need today. Discover the information you need quickly and easily with our reliable and thorough Q&A platform.
Answer:
int x = (int)d
Explanation:
(int) means the largest integer value smaller than <value>.
which is 7.
Only the first choice has the correct syntax.
The second choice sets an int as a double, which does not work.
The third one shows int as a function, d as a parameter, which is not allowed, as int is a keyword in java
For the last choice, you are setting x to 7.5 not 7.
So int x = (int)d is correct.