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()
}

Respuesta :

Answer:

Depends on the format you're needing, as well, you should show us your getAverageScore() method to give us a clearer understanding of what you're needing.