Your conditional if (maxSize < index) is not returning anything. You can fix the compiling error by returning null, but if you do it this way you must safeguard any code that uses this function to...