Ask Question

What is the output of the following code snippet? int age = 25; if (age > 30) { System. out. println ("You are wise!"); } else { System. out. println ("You have much to learn!"); }

+3
Answers (1)
  1. 31 May, 18:40
    0
    You have much to learn!

    Explanation:

    In the question the variable age has been declared and assigned the value of 25.

    The if Statement checks if age >30 to output "You are wise!" else it will output "You have too much to learn"

    Since age has been assigned the value of 25, we expect the program to execute the else block which is "You have too much to learn"
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “What is the output of the following code snippet? int age = 25; if (age > 30) { System. out. println ("You are wise!"); } else { System. ...” in 📗 Computers & Technology if the answers seem to be not correct or there’s no answer. Try a smart search to find answers to similar questions.
Search for Other Answers