Question: Nonsense - The What constructor is intended to initialize the blah instance 3 points variable to the value of the formal parameter nonsense. Which of
Nonsense - The What constructor is intended to initialize the blah instance 3 points variable to the value of the formal parameter nonsense. Which of the following statements best describes why the What constructor does not work as intended. public class What { private String blah; public What(String nonsense) { String blah = nonsense; } } The constructor should have a return type of String The constructor should have a return type of void O The variable blah should not be declared as a String in the constructor The instance variable blah should be designated public The variable blah should be designated public in the constructor
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
