Can't add an animation variable into the script

I’m making a 3D RPG game in Unity, and I don’t know why I can’t create an animation variable. Although I type the following codes,there is no place for me to drag the animation into the script of the player inspector.

Normally the “anim” that I typed in should be shown in black color which representing a variable, but I don’t know why it is showing in green.

private Animation anim;

thank you for any help!

You need to make the variable public for it to be seen in the inspector.

Oh I get it,sorry for this stupid question.
I am a Newbie to C# and Unity, thanks for your help