go to previous page   go to home page   go to next page

Answer:

Yes, as below.


Running the Scanner

To compile and run the programs do this:


C:\Programs>javac WebScannerTester.java WebScanner.java MyPushbackReader.java

C:\Programs>java WebScannerTester test.html

:<html>
:<head>
:<meta name="robots" content="noindex,nofollow">
:<title>
:SECTION
:5
:---
:SCANNERS
:WITH
:ONE
:CHARACTER
:PUSHBACK
:</title>
:</head>

 . . . 

The source files can also be compiled individually, then run as above. test.html is a sample HTML, any that you want, although a simple file would be best.


QUESTION 12:

Could StringTokenizer be used to write the scanner?