Question: Write a method named site. This method accepts the Scanner object as its parameter. This method reads a commercial website URL that starts with www

Write a method named site. This method accepts the Scanner object as its parameter. This method reads a commercial website URL that starts with www and ends with .edu or .com. This method retrieves the name of the site and outputs the site without the www prefix and the domain suffix. If the user enters www.yahoo.com then this method outputs yahoo.

Sample output: You must generate this output exactly How many different website do you have > 3 Enter the URL of the website > www.sierracollege.edu The name of the website you entered is > sierracollege Enter the url of the website > www.csus.edu The name of the website you entered is > csus Enter the url of the website > www.yahoo.com The name of the website you entered is > yahoo

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!