Question: Write a Java program that traverse array of strings, moves null items. You are given an array that is partially filled with Strings. These strings
Write a Java program that traverse array of strings, moves null items. You are given an array that is partially filled with Strings. These strings will be random and are inconsequential to the problem. Some of the spots in the array will be empty (null). Your job is to traverse the array and move all null items to the end of the array. Once this is done, return the array. public String[] MyProblem(String[] myArray) {
//code here
return myArray;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
