Java Practical15
Java Practical15
import java.net.*;
class URLDemo
System.out.println("Ext:" + hp.toExternalForm());
}}
Output:-
Exercise:-
Q.1) Write a program using URL class to retrieve the host, protocol, port and file of URL
http://www.msbte.org.in
import java.net.URL;
try {
} catch (Exception e) {
}
}
Output:-