-
What is the output of this program?
import java.net.*;
public class networking_
{
public static void main(String[] args) throws MalformedURLException
{
URL object = new URL("https://www.interviewmania.com/java/programming");
System.out.print(object.toExternalForm());
}
}
-
- https://www.interviewmania.com/java/programming
- www.interviewmania.com
- interviewmania.com/java/programming
- https://www.interviewmania.com
- None of these
Correct Option: A
toExternalForm() is used to know the full URL of an URL object.