public String[] fizzBuzz(int start, int end) {
String[] arr = new String[end - start];
for(int i = start; i < end; i++) {
if(i % 15 == 0) {
arr[i - start] = FizzBuzz;
} else if(i % 3 == 0) {
arr[i - start] = Fizz;
} else if(i % 5 == 0) {
arr[i - start] = Buzz;
} else {
arr[i - start] = String.valueOf(i);
}
}
return arr;
}
What is the purpose of the above Java code?
a) To find the prime numbers in a given range.
b) To generate a sequence of numbers with specific replacements.
c) To check if numbers in a given range are divisible by 3 and 5.
d) To convert numbers into their string representation based on certain condition