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:

Nutrients

Substances that provide nourishment essential for the growth and maintenance of life, including proteins, carbohydrates, fats, vitamins, and minerals.

Erosion

The process by which natural forces remove soil, rock, or dissolved material from one location and transport it to another.

Phytoremediation

The use of plants to remove, detoxify, or immobilize environmental contaminants in soil or water through natural processes.

Translocation

In genetics, structural rearrangement in which a broken piece of chromosome has become reattached in the wrong location. In plants, movement of organic compounds through phloem.

Related Questions