[John] went off to blow his trumpet till silenced for ever upon one of the bloody battle-fields of Spain. (revised ending for publication)
Regrettably for the reader, Anne succumbs to the overtures of Bob and accepts his proposal. Despite John's manners and strong interest, Anne returns to her childhood crush. John refuses to interfere, but the reader feels she has agreed to marry the wrong person. Nevertheless, is favorably compensated for an earlier favor she performed for Squire Derriman by being the sole inheritor of his estate at Oxwell Hall. This wealth she must share with Bob when they marry, but the honor is properly rewarded to one whose gentility is referred to repeatedly throughout the novel. John departs as he learns of the engagement, to spend his last days on the battlefield.
Considering John is the titular character, he receives a less than significant farewell. He does not win the love of Anne and dies an insignificant death at the end, his "bones left to moulder in [Spain]." The hero of the novel is not given a proper burial, which causes one to question whether Hardy believes there is any value in living honorably. Hardy changed the ending* when he published the novel, causing John to die disappointed. Nevertheless, the ending is not necessarily a good one for Anne, since a wedding has not taken place at the novel's ending and Bob could change his mind again. Additionally, Bob has recently been promoted to lieutenant for his bravery displayed at Trafalgar and he could be sent away at any time.
*Millgate, Thomas Hardy: A Biography Revisited, p. 196