URI.create(String str) has the following syntax.
public static URI create(String str)
In the following code shows how to use URI.create(String str) method.
/*from w w w . ja v a 2s. c om*/ 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.