No, not at all.
End Task in task manager forcibly shuts down the process on Windows. Your application doesn't get a chance to do anything, as far as I know.
'End Process' has the behaviour you describe there.
'End Task' appears to behaviour in a near identical fashion to Command+Q.
I assume it sends a message with the meaning of "please terminate the application soon", because if the application is still active in 5 seconds time the OS assumes it has stopped responding and pops up its own dialog querying whether you wish to forceably terminate the application.
I was completely unaware of the Mac's standardized mechanism for displaying certain menu items; it is interesting that Swing hasn't yet addressed this limitation.
A great reason to design applications so they are sufficiently intuitive to not require menu bars! =)