Answer:
aaaa
Explanation:
We have a function nPrint which return type is void, it means it returns nothing.
we declare the two parameters, one parameter is string type and the second parameter is an integer type.
Then, it has a while loop that executes the statement again and again until the condition not FALSE.
Let dry run the code:
First, call the function nPrint("a", 4) bypassing the value in the argument.
then, the value receives by the parameters, the message contains "a" and n contain 4. After that, while loop checks the condition 4 > 0, which is TRUE and the program starts executing the statement.
The program prints the message on the screen "a" and then decreases the value of n by 1. So, the value of n becomes 3.
The above process repeats for the value of n = 3, 2, 1
and print the message "aaaa".
then, the condition becomes false and the program terminates the loop.
Therefore, the answer is aaaa
Answer:
"void" is the correct answer for the given question.
Explanation:
In the function body the value of balance variable is not return that means we use void return type .The void return type is used when the function does not return any value .
If the function are int return type that means it return "integer value ".
if the function are double return type that means it return the "double value" .
The complete implementation of this method is
public void deposit(double amount) // function definition
{
balance = balance + amount; // statement
}
2 I think because 2 I think is binary I’m sorry if this is wrong