getDeclaredMethods includes all methods declared by the class itself, whereas getMethods returns only public methods, but also those inherited from a base class (here from java.lang.Object).
Read more about it in the Javadocs for getDeclaredMethod and getMethods.