URL getUserInfo Example

URL class getUserInfo example. This example shows you how to use getUserInfo method.


URL class getUserInfo example. public String getUserInfo() Gets the userInfo part 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 GetUserInfo {

    public static void main(String args[]) throws Exception {

        URL url = new URL("http://komal@choudhary.com");

        System.out.println("user info : " + url.getUserInfo());
    }
}

Output
user info : komal

Post Comment
Name:
E-mail:
Contact no :
Comments:
  Refresh Image
Verify Image:
 
 
Your Comment's
 
 
 

HOME | COPYRIGHT | CONTACT US