Advertisements
Advertisements
प्रश्न
Identify the incorrect statement.
पर्याय
long g = 65.8;int t = 72;byte b = 3;double h = 92;
MCQ
Advertisements
उत्तर
long g = 65.8;
Explanation:
Tries to assign a decimal value (which Java treats as a float) to a long integer variable. Because a long can only store whole numbers, this causes a compile-time type mismatch error due to a loss of precision.
shaalaa.com
या प्रश्नात किंवा उत्तरात काही त्रुटी आहे का?
पाठ 2: Class as the Basis of all Computation - Exercises [पृष्ठ ६४]
