Home » JAVA Programming » Networking » Question
  1. What is the output of this program?
    import java.net.*;
    public class networking_Length
    {
    public static void main(String[] args) throws Exception
    {
    URL object = new URL("https://www.interviewmania.com/java/programming");
    URLConnection object0 = object.openConnection();
    int length = object0.getContentLength();
    System.out.print(length);
    }
    }

    Note: Host URL is having length of content 256.
    1. 260
    2. 256
    3. Compilation Error
    4. Runtime Error
    5. None of these
Correct Option: B

256



Your comments will be displayed only after manual approval.