Start learning →

What is the default data type of an integer literal in Java?

Ashort type
Bint type
Clong type
Dbyte type
Answer & Solution
Correct answer: B. int type
Integer literals in Java are treated as int type unless given an L suffix.
Practise this question with Quill — ICSE Class 10 →

Keep practising Classes, Encapsulation and Scope

Browse all Classes, Encapsulation and Scope questions for ICSE Class 10, or explore more Computer Applications topics.

Start a Classes, Encapsulation and Scope lesson →