Java Socket Programming Questions and Answers With PDF

Here is the collection of all Java Socket Programming Interview Questions and Answers. You can also download the PDF for Socket Programming Questions
1. Which of these interface abstractes the output of messages from httpd?
[A] LogMessage
[B] LogResponse
[C] Httpdserver
[D] httpdResponse
Loading...
2. Which of these class is used to create servers that listen for either local or remote client programs?
[A] httpServer
[B] ServerSockets
[C] MimeHeader
[D] HttpResponse
Loading...
3. Which of these is a standard for communicating multimedia content over email?
[A] http
[B] https
[C] Mime
[D] httpd
Loading...
4. Which of these methods is used to make raw MIME formatted string?
[A] parse()
[B] toString()
[C] getString()
[D] parseString()
Loading...
5. Which of these class is used for operating on request from the client to the server?
[A] http
[B] httpDecoder
[C] httpConnection
[D] httpd
Loading...
6. Which of these method of MimeHeader is used to return the string equivalent of the values stores on MimeHeader?
[A] string()
[B] toString()
[C] convertString()
[D] getString()
Loading...
7. What is the output of this program?

import java.net.*;
class networking {
public static void main(String[] args) throws Exception {
URL obj = new URL("http://www.sanfoundry.com/javamcq");
URLConnection obj1 = obj.openConnection();
System.out.print(obj1.getContentType());
}
}
[A] html
[B] text
[C] html/text
[D] text/html
Loading...
8. Which of these is an instance variable of class httpd?
[A] port
[B] cache
[C] log
[D] All of the mentioned
Loading...
9. Which of these is an instance variable of httpd that is a Hashtable?
[A] port
[B] cache
[C] log
[D] stopFlag
Loading...
10. What is the output of this program?

import java.net.*;
class networking {
public static void main(String[] args) throws MalformedURLException {
URL obj = new URL("http://www.eduzip.com/javamcq");
System.out.print(obj.toExternalForm());
}
}
[A] eduzip
[B] eduzip.com
[C] www.eduzip.com
[D] http://www.eduzip.com/javamcq
Loading...
Are these questions helpful for you?

Comments: (Your feedback is valuable to us)