Write a program that reads a java source file and produces


Problem

1. Insert all words from a large file (such as the novel "War and Peace", which is available on the Internet) into a hash set and a tree set. Time the results. Which data structure is faster?

2. Write a program that reads a Java source file and produces an index of all identifiers in the file. For each identifier, print all lines in which it occurs. For simplicity, we will consider each string consisting only of letters, numbers, and underscores an identifer. Declare a Scanner in for reading from the source file and call in. use Delimiter("[^A-Za-z0-9_]+"). Then each call to next returns an identifier.

Request for Solution File

Ask an Expert for Answer!!
Computer Engineering: Write a program that reads a java source file and produces
Reference No:- TGS02636941

Expected delivery within 24 Hours