You've got everything pretty much set up and good to go. Where you're probably encountering your problem is when it comes to casting. Because the variables are integers, calculating the percentage will reduce to 0.
You will need to cast to the proper format, then cast to integer. Like so:
PHP Code:
percents[j] = (int)( ( (float)grade[j] / (float)outOf[j] ) * 100 );
System.out.println( "Percentage of Grade " + j + " is " + percents[j] );
That code would go in that empty for loop of yours.