John 2:18-25 - "So the Jews answered and said to Him, 'What sign do You show to us, since You do these things?' Jesus answered and said to them, 'Destroy this temple, and in three days I will raise it up.' Then the Jews said, 'It has taken forty-six years to build this temple, and will You raise it up in three days?' But He was speaking of the temple of His body. Therefore, when He had risen from the dead, His disciples remembered that He had said this to them; and they believed the Scripture and the word which Jesus had said. Now when He was in Jerusalem at the Passover, during the feast, many believed in His name when they saw the signs which He did. But Jesus did not commit Himself to them, because He knew all men, and had no need that anyone should testify of man, for He knew what was in man."
Jesus' unprecedented actions at the temple attracted attention and piqued the interest of the Jewish authorities. They demanded a "sign" or proof of His authority for such actions.
Jesus' response to them was cryptic - "Destroy this temple, and in three days I will raise it up" (John 2:19). Its full meaning was probably not understood by anyone at that time, but Jesus was giving reference to the sign which would prove His authority for such actions; that is, His resurrection from the dead on the third day (cf. Rom. 1:4). He was not speaking of the literal temple that stood in Jerusalem but the temple of His body, as John explains for the reader in 2:21. Jesus is here predicting His death and resurrection!
The Jews, not comprehending His words, started talking about the physical temple. It was actually the third temple that had been built on that location. Solomon had built the first one around 960 B.C. It was undoubtedly the greatest temple ever to be constructed there. It was destroyed by the Babylonians in 586 B.C. and was rebuilt around 520 B.C. This second temple was torn down, but in such a fashion as not to interfere with the temple rituals. It began to be rebuilt by Herod the Great in approximately 19 B.C. It had been in the process of construction for forty-six years already, and it was not completed until 64 A.D. (only to be destroyed again in 70 A.D. by the Romans). The Jews misunderstood Jesus' statement and believed Him to be making an "impossible" claim (of course, had they understood Him, they still would not have believed)!
It was three years before the apostles understood what Jesus meant here (cf. Luke 24:44-47). John commented "they believed the Scripture", likely Psalm 16:10. Why did it take the disciples so long to understand that Jesus would die and be resurrected? Because they, like the other Jews, believed that the Messiah would be an earthly king over a temporal kingdom, and that He would exercise sovereignty at physical Jerusalem. This notion simply did not allow for the suffering and death Jesus often mentioned. Thus, they were unable to understand it. Only when He died and triumphed over death were they able to open their eyes to the fact that Jesus really did fulfill the Old Testament predictions regarding the Messiah, and that His kingdom would be a spiritual one. These truths laid dormant in their hearts for years before they sprung up and bore fruit; such still happens today with some.
John 2:23-25 records some other general information regarding Jesus' visit to Jerusalem during the Passover feast. He evidently performed unspecified miracles that resulted in many believing in His name. However, "Jesus did not commit Himself to them" because He knew the hearts of men well enough to know that the public was not yet ready to learn of His status as the Messiah.
John also mentions that Jesus had no need for anyone to tell Him about other individuals, for He could look into their hearts Himself and know them (cf. Jer. 17:10). This is an attribute of deity for only God can know the hearts of men (e.g., John 1:47; 4:29; 6:61,64; 13:11; 21:17)!