this was the instructions...
"Write a short Java program that takes two arrays a and b of length n storing int values, and return the dot product of a and b. That is, it returns an array c of length n such that c = a . b, for i = 0, 1, ..., n - 1." The program must ask the user for the length of the arrays and the integers in both arrays.
and i thought i was done..but i keep getting "no main classes found" ..is it because i am using
public static int [] returnArray( int a[], int b[] )
instead of
public static void main(String args[])
how can i fix my program and make it work fine...
here is my code
public class Arrays {
public static int [] returnArray( int a[], int b[] )
{
int c[] = null;
for(int i =0; i< a.length; i++ )
{
c[i]+=( a[i]+b[i] );
}
return c;
}
}