1,HTML source code£º <html> <head> <title>How to use EmptyStackException</title> </head> <body> <script src="jsjava.js"></script> <script> var s=new Stack(); try{ var value=s.pop(); }catch(e){ document.write(e.message); } </script> </body> </html> 2,The display:

Stack has been empty!