Question: In java language. Read the text from a Web page. The URL for the Web page is passed as an argument. Words are delimited by
In java language.
Read the text from a Web page. The URL for the Web page is passed as an argument.
Words are delimited by whitespace, punctuation marks (,;.:?), quotation marks (), and parentheses.
Count words in case-insensitive fashion (e.g., consider Good and good to be the same word).
The words must start with a letter.
Display the output in alphabetical order of words with each word preceded by its occurrence count.
Test your program with the input URL www.google.com
Here is a sample run:
Input URL: https://www.google.com Display words and their count in ascending order of the words 48 a 1 agen 2 all 2 amp 1 and 1 appendchild 1 apply 3 arial ...
Here is what I have so far:
import java.util.*;
public class HW3_Q3 {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
System.out.print("Input URL: ");
String urlStr = scanner.nextLine();
scanner.close();
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
