Question: Suppose the class Message is partially defined as shown below: public class Message { private String value; public Message ( String initial ) { value

Suppose the class Message is partially defined as shown below: public class Message { private String value; public Message(String initial){ value = initial; } public String getMessage(){ return value; }} A subclass of Message, ExcitedMessage, is defined that will behave like Message, except that it will add two exclamation points to the end of the message. Sample code that uses ExcitedMessage is shown below. ExcitedMessage greeting = new ExcitedMessage("Hello"); System.out.print(greeting.getMessage());// will print "Hello!!" Which ExcitedMessage constructor will give this behavior? Group of answer choices public ExcitedMessage(String line){ super(line +"!!"); } public ExcitedMessage(String line){ value = line +"!!"; } public ExcitedMessage(String line){ line = line +"!!"; super(line); } public ExcitedMessage(String line){

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!