MCQs > IT & Programming > Java > Output when the following code is compiled and run? public class Test { public static void main(String args[]) { int i; i = 3; System.out.println((int) i * 2.5 / 3.0); } }

Java MCQs

What will be the output when the following code is compiled and run? public class Test { public static void main(String args[]) { int i; i = 3; System.out.println((int) i * 2.5 / 3.0); } }

Answer

Correct Answer: The code will print 2.5.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it