Problem 1 (5 points)
Write a public static method called fillSpace that takes in and returns a character array. In a fit of egotism, I ask that you replace every space character (' ') in the array parameter with my name, 'B''e''n'. The returned array should not be any larger than required. Your method should not use the String class or any other helper classes.
For example, when complete, the code should behave like this:
char[] str = {'H','e','y',' ','y','o',u'};
[login to view URL](str);
[login to view URL](fillSpace(str));
Hey you
HeyBenyou
Problem 2 (5 points)
Write a public static method called fileAverage that takes a String that is the absolute path to a file. You may assume the file is just a simple text file with a series of real numbers like this. You will however need to handle a file related exception with a try catch. Your catch block should print out information about the exception and your method should not throw the exception. Your method should return a double that is the average of the numbers in the file.
Hi I am a Software Engineer with more than 7 years experience of Java development.
I will provide yo u the desired work with utmost of your satisfaction, looking forward to hear from you soon. Thanks.