The short answer is “yes, according to God’s perfect will he answers prayer.” But it is not always the “yes” we are asking.  Instead, it is the “yes” that we need.  Jesus wants us to be bold and expectant in prayer.  God is going to answer this prayer. He’s going to answer it as if you would have prayed it knowing what He knows and being as good as He is.   So that when there is a believer crying out, “Lord, I want to marry him. Lord, I want to marry her.” And the Lord is thinking, “Child, you have no idea what you’re asking for and I’m not going to answer that prayer the way that you want Me to answer that prayer, but here’s My answer, child, you will have the Holy Spirit. You will be blessed. You will be kept. You will be given grace. You will be given peace. You will be given communion. And I’ll give you something better than what you’re asking for (Luke 11:13).” (Ligon Duncan)

John Calvin explains further:

God does not always answer our prayers as we pray them, but as we would pray them if we were wiser….we must not give way to foolish and improper desires in prayer. We know how great influence, in this respect, is exerted by the excesses and presumption of our flesh. There is nothing which we do not allow ourselves to ask from God; and if he does not humor our folly, we exclaim against him. Christ therefore enjoins us to submit our desires to the will of God, that he may give us nothing more than he knows to be advantageous. We must not think that he takes no notice of us, when he does not answer our wishes: for he has a right to distinguish what we actually need. All our affections being blind, the rule of prayer must be sought from the word of God: for we are not competent judges of so weighty a matter. He who desires to approach God with the conviction that he will be heard, must learn to restrain his heart from asking any thing that is not agreeable to his will.”

-John Calvin, Commentary on the Harmony of the Gospels