Question: import java.util.Scanner; public class PoD { /** * ====Method for you to complete==== * This method will receive a string. It will split the string

Instructions Today you are going to finish off a method described below. Your work isn't wasted.. maybe you could make use of this one in your assignment? If you already have? Volb, its all that much easier! [It's STILL due this coming Sunday!) Details of splitText() method * Hethod for you to conplete * This method will receive a string It will split the string into * & string array such that each of cell contains the individual * characters that make up the string (text) provided * @param text String * @return String array of individual characters that make up the string (text) provided Input: Parameters The method will take the following parameters: . a string (text): some string to be split(e.g. "R" or "34" or "Angela] Processing Split the string provided into its individual characters and use these to populate a string array that you will return Output: Return value The method will return the string array containing each of the individual characters that made up the string provided as input. (All program output from the main method, is handled for you) Sample method Input/output: split Text() Input arguments splitText() Return value "B6" "R3" {"R", "3"} "Angela" import java.util.Scanner; public class PoD * ====Method for you to complete==== * This method will receive a string. It will split the string into * a string array such that each of cell contains the individual * characters that make up the string (text) provided. @param text String * @return String array of individual characters that make up the string (text) provided static String[] splitText(String text) { //START WORK HERE //END WORK HERE public static void main(String[] args) { //INPUT Scanner in = new Scanner(System.in); String banana = in.nextLine(); System.out.println(banana); String[] bananaSplit = splitText(banana); for (String word : bananaSplit) { System.out.println(word); 55 } 57
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
