When do you capitalize i?

"I" is capitalized if it is the beginning letter of a name, for example the name of the country India. One must also capitalize "I" if her or she is using it to refer to himself/herself. For example, in the sentence "I am hungry."