Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
The given Java code snippet shows a class SalutationMethodOverload that already contains an overload...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started