1,HTML source code£º <html> <head> <title>How to use StringCharacterIterator</title> </head> <body> <script src="jsjava.js"></script> <script> var sci=new StringCharacterIterator("acefd"); for(var c=sci.last();sci.hasMore();c=sci.previous()){ out("--------"); out("char:"+c+" "+"current:"+sci.current()+" "+"begin:"+sci.getBeginIndex()+" "+"end:"+sci.getEndIndex()+" "+"index:"+sci.getIndex()); } function out(s){ document.write(s+"<br>"); } </script> </body> </html> 2,The display:

--------
char:d current:d begin:0 end:4 index:4
--------
char:f current:f begin:0 end:4 index:3
--------
char:e current:e begin:0 end:4 index:2
--------
char:c current:c begin:0 end:4 index:1
--------
char:a current:a begin:0 end:4 index:0