Examlex

Solved

How Many Times Will the Following Method Call Itself If

question 27

Multiple Choice

How many times will the following method call itself if the value 10 is passed as an argument?
Public static void message(int n)
{
If (n > 0)
{
System.out.println("Print this line.\n") ;
Message(n + 1) ;
}
}


Definitions:

Hyster/o

A prefix in medical terminology relating to the uterus.

Mamm/o

A prefix related to the breast or mammary glands.

Men/o

A prefix relating to the menstrual cycle or menstruation.

Retro-

A prefix meaning backward or behind, often used in medical and scientific contexts to indicate reversal or a backward position.

Related Questions