Ask Question

Suppose income is 4001, what is the output of the following code? if (income > 3000) { System. out. println ("Income is greater than 3000"); } else if (income > 4000) { System. out. println ("Income is greater than 4000"); }

+1
Answers (1)
  1. 13 April, 11:42
    0
    Output:

    Income is greater than 3000

    Explanation:

    In conditional statements, either the if statement is processed or the else if.

    In this scenario, both the given conditions fit for the given output but when if block will be processed, the else if block will be skipped by default.

    So the output will only be the out phrase of if block which is:

    Income is greater than 3000.
Know the Answer?
Not Sure About the Answer?
Find an answer to your question 👍 “Suppose income is 4001, what is the output of the following code? if (income > 3000) { System. out. println ("Income is greater than ...” 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