1John 2:24,25 See that what you have heard from the beginning remains in you. If it does, you also will remain in the Son and in the Father. And this is what he promised us— even eternal life.
I think John is contrasting these verses with those concerning antichrists who reveal themselves by leaving the faith. In particular what John is referring to as "what you heard from the beginning" is the fact that Jesus is the Christ, the Son of God.
In his second letter John writes a parallel passage concerning these same ideas saying, "Many deceivers, who do not acknowledge Jesus Christ as coming in the flesh, have gone out into the world. Any such person is the deceiver and the antichrist. Watch out that you do not lose what you have worked for, but that you may be rewarded fully. Anyone who runs ahead and does not continue in the teaching of Christ does not have God; whoever continues in the teaching has both the Father and the Son." 2John 1:7-9