Question PRG-JAVA-0024
EasyIn Java, what is 7 / 2 when both numbers are ints?
- A.
3
- B.
4
- C.
Show answer and explanation
Answer: A
Integer division drops the fractional part.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Java question
In Java, what is 7 / 2 when both numbers are ints?
3
4
Answer: A
Integer division drops the fractional part.
3.5
3.0