PRACTICE / UNDERSTAND / REPEAT
Java practice question
Practice types & casting with self-contained questions. Check your answer, then use the explanation to understand the reasoning.
1 questionAnswers explainedFree · no login
Try this question
What may happen when a long is narrowed to int?
Answer & explanation
Answer: High-order bits may be discarded
Narrowing integer conversion can lose information without throwing an exception.