Both of these characters are accepted by our scripts, but from an SEO "duplicate content" standpoint we recommend you use the "#" character so that the search engine doesn't interpret the element.
This way, while our JDKs will interpret the information contained in the URL after the "#" character, the search engine won't.