Ask Question
8 March, 23:12

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"); }

+5
Answers (1)
  1. 9 March, 01:40
    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?
Get 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 there is no answer or all answers are wrong, use a search bar and try to find the answer among similar questions.
Search for Other Answers