Task - Implementing a Generic Method
You can clone the base code from the GithHub Repository.
We have a program which contains a method called ReverseArray. The method reversed an integer array.
In the main method, we are attempting to reverse a string array as well, however, it results in an error because the ReverseArray method does not support a string array.
Your task is to convert the ReverseArray method into a generic method so that the program is able to reverse and display both example and strExample arrays without any errors.
Nothing needs to be modified in the main method.
Check: If the program compiles and runs successfully, reversing and outputting both the int and string type arrays using the same reverseArray method, then your solution is correct.
Дякуємо за ваш відгук!
Запитати АІ
Запитати АІ
Запитайте про що завгодно або спробуйте одне із запропонованих запитань, щоб почати наш чат
Awesome!
Completion rate improved to 3.7
Task - Implementing a Generic Method
Свайпніть щоб показати меню
You can clone the base code from the GithHub Repository.
We have a program which contains a method called ReverseArray. The method reversed an integer array.
In the main method, we are attempting to reverse a string array as well, however, it results in an error because the ReverseArray method does not support a string array.
Your task is to convert the ReverseArray method into a generic method so that the program is able to reverse and display both example and strExample arrays without any errors.
Nothing needs to be modified in the main method.
Check: If the program compiles and runs successfully, reversing and outputting both the int and string type arrays using the same reverseArray method, then your solution is correct.
Дякуємо за ваш відгук!