Java URI.create(String str)
Syntax
URI.create(String str) has the following syntax.
public static URI create(String str)
Example
In the following code shows how to use URI.create(String str) method.
// w w w.j a va 2s .c o m
import java.net.URI;
public class Main {
public static void main(String[] args) {
URI uri = URI.create("http://java2s.com");
System.out.println(uri);
}
}
The code above generates the following result.