== operator is used only for address comparision. not for the content comparision. here c and d are objects having some addresses.
coming to equals method .. it is also for address comparision. if any class is overridden that method from object class... that implementation is specific to that class. for example String class... it overrides the equals method. in this case this method for content comparision only.