I am having a problem extracting the domain name from any url a user can input. We have to test our program with http://www.google.com, http://amazon.com and http://mix.wvu.edu.
import java.util.Scanner;
public class lab3 {
public static void main( java.lang.String[] args) {
System.out.println ("Please enter the URL");
Scanner in = new Scanner(System.in);
String Url = in.nextLine();
System.out.println();
}
}
This sad bit of java is what I have so far, I'm just not sure what step is next after i have the user enter the Url! any help would be amazing!