What will be the output of the following Java program?

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

Note: Host URL is written in html and simple text.
a) html
b) text
c) html/text
d) text/html

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

Leave a Comment