can someone explain to me how I format the average using string.format?

here is what I have

public String toString()
{
return "Name: " + studentName +
"\n Total Score: " + totalQuizScore +
"\n Average Score: " + getAverageScore()
}