What's the difference between the two GetComponents?

I’m using c# , what’s is difference between GetComponents , GetComponent ?

GetComponent() returns the first one found. GetComponents() returns an array of all the components of that type found. For example say your game object might have multiple HingeJoints. You could get them all in an array with:

public HingeJoint[] hingeJoints = gameObject.GetComponents<HingeJoint>();

Where the GetComponent() whould only return one:

public HingeJoint hingeJoint = gameObject.GetComponent<HingeJoint>();