It depends what you mean by "surprise," but if you mean:
Did they know the US was building atomic bombs? Did they expect the US to drop atomic bombs on them? No and no. Apparently they had no clue the US was actively developing them and planning to use them. This is somewhat remarkable, in a way, because if they had looked for evidence (even just in published sources) of US activity in this area, they could have found some. Other nations certainly did. (The fact that all publication activity in the area of fission had permanently stopped was enough to alert the Soviets to this fact. Several Indian scientists also figured out that the US must be working on it. All of these were just about the absences of information, not even people who saw the many published leaks that took place during the war.) But they apparently didn't look, or if they did look, didn't look hard enough. The Germans were also apparently quite ignorant on this matter, though they did attempt to use spies to probe into the US atomic program (with no success, since the spies were immediately caught). The questions the Germans sent their spies indicated that the Germans did not really think the US was making a bomb, just that they might be doing reactor work on a small scale (as Germany was).
Did they know about the possibility of atomic bombs? Yes, as did most nations and all science journalists in the early 1940s. The Japanese had their own fission research programs, but they were small-scale (not bomb production programs), and they had concluded that making atomic bombs, while potentially feasible, would require such resources that even a country as resource-rich as the USA would probably have too hard a time of doing it during the period of war. This isn't actually a bad judgment, even though it was wrong. Making atomic bombs in the 1940s was incredibly difficult and even the US underestimated how difficult it would be a wide factor (one example of this is that their budget estimate at the beginning of the project was 500% under what it actually cost), and it required an immense resource investment for a very risky outcome (600,000 Americans worked on the bomb project; that's about 1% of the entire US civilian labor force during the war).