Has shown in the Java Doc, the Container class has 5 different add() methods overloads
In your first example, BorderLayout.NORTH is a constant defining the position of your component in the Container.
In your second example, "North" is the name you give to your component.