There is a good chance that it will work. New functionality is added with each release and occasionally some things are deprecated or obsoleted, but not until there is new functionality to take its place. At worst you'll have to rewrite a little bit of code to take advantage of the new functions; but most likely it will run without problems.
It is more of a problem to go backward, for instance sharing the journal you wrote using NX6 with someone who is running NX5. In this case you may have used a function that doesn't exist in the lower version.