Question: write a static method called toString that takes an array of String as a parameter and returns a string that is the concatenation of all
write a static method called toString that takes an array of String as a parameter and returns a string that is the concatenation of all the elements in the array separated by a blank space. So if the array was String l example ={ "apple", "boat", "cat"); then a call to toString(example) returns "apple boat cat"; Your method should throw a NullPointerException if the input array is null or if any of the elements is uninitialized ie null. Use a try catch statement Edit View Insert Format Tools Table 12ptParagraph Tv O words
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
