What will be the output of the following Java program?

import java.net.*;
 class networking 
 {
     public static void main(String[] args) throws MalformedURLException 
     {
         URL obj = new URL("https://www.sanfoundry.com/javamcq");
         System.out.print(obj.toExternalForm());
     }
 }

a) sanfoundry
b) sanfoundry.com
c) www.sanfoundry.com
d) https://www.sanfoundry.com/javamcq

1 thought on “What will be the output of the following Java program?”

Leave a Comment