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, 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
The given Java code snippet shows a class SalutationMethodOverload that already contains an overload... View full answer
Get step-by-step solutions from verified subject matter experts
