Question: Prepare a method that takes a String as input and returns a String containing the middle character of the String if the length of that String is odd.
If the length of the String is even, your method should return the middle two characters.
For case, if the input String is "Hello" the method should return "l" and if the input String is "Worlds" the method should return "rl". In addition, prepare a main method that tests your method for a variety of String values.
The code must be error free and compile properly on first attempt. Any code that does not do this will not be awarded points.