Q:

Is war file equivalent to executable or object file like in c?

Is war file generated after linking or before linking?
Does it undergo linking at the deployment phase on the server?

A:

Kind of a vague and apples-to-oranges question.
Some points
1) a WAR file is supposed to be self-contained. So if we stretch the analogy, it is like a statically linked binary.
2) of course, it still needs the application server (and the JVM itself) to run
3) all class-loading (which is probably the closest to "linking" in Java) happens during run-time, when the class is first needed. There will be some consistency checks during deployment, but it won't check if all classes are present, for example. So no "linking during deployment", really.
4) the WAR file is generated as part of the build process. This happens after compilation, but it is a simple zip archival operation. Not much "linking" logic in there. So no "linking during building" either.
5) a WAR file can be runnable/executable (though this is more common with JAR files). Even if it is not, it is almost never used as a "library" for other programs (which is common with JAR files).

