A delimiter is a character used to signify a boundary betweenpieces of data. This is useful for many practical computerapplications. For example, when you send an email to multiplepeople, you usually write a semicolon or comma as a delimiter toseparate the list of recipients. Another common example is usingcommas as delimiters in CSV (comma-separated values) files, whichare easily imported into a spreadsheet like Excel.
Write a method explode(String s, String d) that separates thestring s according to the delimiter d. You may assume that thedelimiter is exactly one character in length. method should returnan array of the “words” between the delimiters.
Your method should produce empty strings (“”) when you havedelimiters at the beginning or end of s, or when s containsmultiple delimiters in a row. Use only the String class methodsmentioned at the beginning of this assignment in your solution. Inparticular, do not use the split method