For we do not have a high priest who is unable to sympathize with our weaknesses, but one who in every respect has been tempted as we are, yet without sin. (Hebrews 4:15)
Could Jesus have sinned?
From the moment of His incarnation, Jesus Christ has been fully God and fully man. He is one indivisible Person, with two natures. It's not possible that Jesus' human nature could have sinned and left His divine nature untouched. His divine nature made sin an impossibility.
Now, some say that this is cheating. If Jesus could not have sinned, then His temptation was a fraud.
Think about it, though.
Temptation is like an itch; sin temporarily scratches that itch.
Temptation is like a desperate, panicky thirst; sin temporarily quenches that thirst.
Sin can never permanently relieve temptation, of course, but it does provide temporary relief. Why do we choose to sin rather than endure temptation? Because, in that moment, temptation is worse, in our minds, than the consequences of sin.
Imagine that you have an itch that you cannot scratch; a burned, crawling, painful itch. You can't reach it. It spreads over your body, from the soles of your feet, to the middle of your back, to your scalp. In the Bible, Job's itching was so terrible that he used broken bits of pottery to scrape his skin, preferring the physical pain of scratching to the physical misery of itching. Most of us have never experienced that sort of cruel sensation.
Or imagine that you are terribly thirsty, your mouth is dry, your throat is tight, your lips feel like they're cracking, it's hard to swallow, your heart is racing, and the craving for a drink becomes all consuming. People lost at sea often drink sea water out of desperation; the salt in the water actually increases their thirst, but they don't care. Most of us have never experienced that sort of desperate, life threatening thirst.
Temptation to sin is exactly like an itch that spreads and grows the more you ignore it. It is exactly like a desperate thirst that can drive someone temporarily insane.
How could it possibly be "cheating" for Jesus to endure the itch and thirst of temptation, without having the possibility of even temporarily relieving the suffering He experienced? Sin obviously brings its own suffering. But Jesus endured an unimaginable level of suffering from the unquenchable temptation He faced. He was "in every way tempted, yet without sin." As a result, Hebrews 4:16 says, we can "with confidence draw near to the throne of grace, that we may receive mercy and find grace to help in time of need." The Savior not only understands the pain of our sin, He also understands the desperation that drives us to sin.