What is the functionality of the following piece of code?
public Object function(int row_index, int col_index)
{
if (row_index < 0 || col_index > N)
{
System.out.println("column index out of bounds");
return;
}
return (sparse_array[row_index].fetch(col_index));
}
public Object function(int row_index, int col_index)
{
if (row_index < 0 || col_index > N)
{
System.out.println("column index out of bounds");
return;
}
return (sparse_array[row_index].fetch(col_index));
}A. Store the element in the specified position
B. Get the element from the specified position
C. Alter the element in the specified position
D. Removes the element from the specified position
Answer: Option B

Join The Discussion