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 MessageString 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 ExcitedMessageHello; System.out.printgreetinggetMessage; will print "Hello!!" Which ExcitedMessage constructor will give this behavior? Group of answer choices public ExcitedMessageString line superline ; public ExcitedMessageString line value line ; public ExcitedMessageString line line line ; superline; public ExcitedMessageString line
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
