public class StringSplitter
extends java.lang.Object
The provided code is incomplete. Modify it so that it works properly and passes the tests in
StringSplitterTest.java
.
Constructor | Description |
---|---|
StringSplitter() |
Modifier and Type | Method | Description |
---|---|---|
static void |
main(java.lang.String[] unused) |
Solicit a string and split it whenever the character changes.
|
static java.lang.String[] |
splitString(java.lang.String input) |
Given a string, return a string array that contains the input string split at every change of character.
|
public static java.lang.String[] splitString(java.lang.String input)
For example:
Your function may be called with an empty or null string. If the string is empty, return an empty array. If the string is null, return null.
input
- the string to splitpublic static void main(java.lang.String[] unused)
You are free to review this function, but should not modify it. Note that this function is not tested by the test suite, as it is purely to aid your own interactive testing.
unused
- unused input arguments