Get substring using valueOf - Java Quiz Question


Write a program to get the substring from the given char array according to the substring start index and number of characters.
For more clarification see the requirements.

Input (char[], int, int) Output (String)
{'H', 'e', 'l', 'l', 'o', 'W', 'o', 'r', 'l', 'd'}, 5, 5 'World'
{'J', 'a', 'v', 'a', 'S', 'c', 'h', 'o', 'o', 'l'}, 0, 4 'Java'
{'M', 'a', 't', 'h', 'e', 'm', 'a', 't', 'i', 'c', 's'}, 5, 6 'matics'
{'C', 'o', 'n', 'c', 'e', 'n', 't', 'r', 'a', 't', 'e'}, 7, 4 'rate'



class GetSubStringUsingValueOf
{
    public static void main(String s[])
    {
        System.out.println("The resultant substring is : " + getSubString("HelloWorld".toCharArray(), 5, 5));

    }


    public static String getSubString(char[] inputArray, int startIndex, int numberOfCharacters) {
    }

}