Introduction
Here is the source code for Main.java
Source
//package com.java2s;
public class Main {
/**
* It gets the host of a URL
* @param fullPath main string to be parsed
* @return the host of a URL
*/
public static String host(String fullPath) {
return fullPath.split("/")[2];
}
}