Skip to content

Instantly share code, notes, and snippets.

@davecahill
Created August 7, 2013 01:07
Show Gist options
  • Save davecahill/6170364 to your computer and use it in GitHub Desktop.
Save davecahill/6170364 to your computer and use it in GitHub Desktop.
import java.net.URI;
class HelloWorldApp {
public static void main(String[] args) {
try {
String blah = "blah";
URI one = new URI(blah);
URI three = new URI("test", blah, null);
URI four = new URI("test", blah, null, null);
System.out.println(one); // prints "blah"
System.out.println(three); // prints "test:blah"
System.out.println(four); // prints "test://blah"
} catch(Exception e1) {
e1.printStackTrace();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment