What I'm trying to do I'm trying to this product of the values of 2 arrays. But I'm getting this error and I don't know how to fix this. Any help please? Here is my code:
public class This
{
public int InternProduct(int vector1, int vector2)
{
int v1 []= new int[vector1], v2[] = new int[vector2];
int mult = 0, n = 0;
for(int i=0;i<=10;i++)
{
if(n<vector1)
n=vector1;
if(vector1<vector2)
n=vector2;
if(i==10)
{
for(int j = 1; j <= n; j++)
mult += (v1[j]*v2[j]);
}
}
return mult;
}
}