Question: JAVA Assume that greeting is a String variable. Which of the following method calls illustrate using the return value of a method as an argument?

JAVA

Assume that greeting is a String variable. Which of the following method calls illustrate using the return value of a method as an argument?

greeting.println("Hello");
System.out.println(greeting.length());
System.out.println(length.greeting());

greeting.length();

___________________________________________________________

Given this method comment, fill in the blank in the method implementation.

/*
 Deposits money into the bank account
 amount: the amount to deposit
*/
public _____ deposit(double amount)
{
 balance = balance + amount;
}
void
return
null
double

____________________________________________________________

Choose the method header that goes with this method comment.

/*
 Determines and returns the salary of an employee.
*/
public double getSalary
public void getSalary()
public double getSalary()

public void getSalary

____________________________________________________

What is a parameter variable?

A variable that is declared in the body of a method.
A variable that is declared in the header of a class.
A variable that is declared in the header of a method.
A variable that is declared in the body of the class.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!