Question: Fill in the parameters in the second method header for the overloaded method displaySalutation(). The number, type, and order of the method parameters are

Fill in the parameters in the second method header for the overloaded method displaySalutation(). The number,

Fill in the parameters in the second method header for the overloaded method displaySalutation(). The number, type, and order of the method parameters are indicated in the method call from main(). Ex: If the input is Haru Evening, then the output is: Greetings, Lachlan Evening, Haru 1 import java.util.Scanner; 2 3 public class SalutationMethodOverload { 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 public static void displaySalutation(String name) { System.out.println("Greetings, + name); } public static void displaySalutation(/* Your code goes here */) { System.out.println(customSalutation + + name); 3 } public static void main(String[] args) { Scanner scnr = new Scanner(System.in); string name; String salutation; name = scnr.next(); salutation = scnr.next(); "1

Step by Step Solution

3.47 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The given Java code snippet shows a class SalutationMethodOverload that already contains an overload... View full answer

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 Programming Questions!