URL getRef Example
URL class getRef example. This example shows you how to use getRef method.
URL class getRef example. public String getRef() Gets the anchor (also known as the "reference") of this URL.
Here is the code
/*
* @ # GetRef.java
* A class repersenting use to getRef method
* of URL class in java.net package
* version 24 June 2008
* author Rose India
*/
import java.net.*;
public class GetRef {
public static void main(String args[]) throws Exception {
URL url = new URL("http://choudhary.com#inbox");
System.out.println(url.getRef());
}
} |
|