swappable parts?

I have a 340 with a cracked water jacket, so my dad pick up a 318 for cheap. I have a question though, the guy said we can swap the heads and the intake directly from the 340 to the 318 is this possible, because the engine is my next task thanks.