I thought of loading the question and its corresponding question in hasMap and access it from java script, to display it to the user. But i have no idea how to access it or is it possible to access it.
This is not possible. JavaScript can't instantiate Java code, they are two unrelated technologies. If your Java is running client side it is doing so in an Applet, in which case you don't need JavaScript, since Swing gives you the same select box functionality. If it is running server side (i.e. in a Servlet) it is relatively simple to write out the contents of your HashMap to a HTML select form element, or into a JavaScript array.