My Report

Java Networking Test – 2


Correct Answer: 2 points | Wrong: -1 point
Grades: A* (100% score) | A (80%-99%) | B (60%-80%) | C (40%-60%) | D (0%-40%)
advertisement

1. Which of these is a standard for communicating multimedia content over email?

2. Which of these interface abstractes the output of messages from httpd?

3. Which of these class is used to create servers that listen for either local or remote client programs?

4. 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());
        }
    }

5. 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.

6. Which of these methods is used to make raw MIME formatted string?

7. Which of these method of MimeHeader is used to return the string equivalent of the values stores on MimeHeader?

8. Which of these class is used for operating on request from the client to the server?

9. Which of these is an instance variable of class httpd?


 

Start practicing “1000 MCQs on Java”, and once you are ready, you can take tests on all topics by attempting our “Java Test Series”.

Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.