java to MIPS code

public static void main(String()args)
int() array = new int() { 1,2,3,4,5,6,7,8,9,10 }; int x= sum (array)
public int sum
(int() a)
int i=0; int result=0; while (i<a.length)
{
result = result + a(i); i=i+1;
return result;