Question: Write a Java program that will split the following string ( the code should be able to handle any number of commas ) and store
Write a Java program that will split the following string the code should be able to handle any number of
commas and store the elements in an Array or Array List:
String str "Apple, Orange, Pear, Peach";
Your code will create an array of strings: Apple "Orange", "Pear", "Peach"
Now, write a code to create a new string from the array you just created:
String str "AppleOrangePearPeach";
Important: You cannot use any builtin methods of the String class.
Do at home:
Use the codes you developed to read lines commaseparated from the file input.csv darr and write the lines in a
file called output.txt in the format of the second string above.
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
