Question PRG-JAVA-0004
EasyWhat is the size of an int in Java?
- A.
32 bits
- B.
16 bits
- C.
64 bits
- D.
It depends on the platform
Show answer and explanation
Answer: A
Java fixes primitive sizes on every platform: int is always 32 bits.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
What is the size of an int in Java?
32 bits
16 bits
64 bits
It depends on the platform
Answer: A
Java fixes primitive sizes on every platform: int is always 32 bits.