MCQs > IT & Programming > Java > Assuming that val has been defined as an int for the code below, which values of val will result in 'Test C' being printed? if( val > 4 ) { System.out.println('Test A'); }else if( val > 9 ) { System.out.println('Test B'); }else System.out.println('Test C');

Java MCQs

Assuming that val has been defined as an int for the code below, which values of val will result in "Test C" being printed?

 if( val > 4 ) {
  System.out.println("Test A");
 }else if( val > 9 ) {
    System.out.println("Test B");
 }else
  System.out.println("Test C");

Answer

Correct Answer: val = 0

Explanation:

Note: This question has more than 1 correct answers

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