Java Network Programming Questions and Answers
1. Which of these methods of httpd class is used to read data from the stream?
Loading...
2. Which of these method of httpd class is used to get report on each hit to HTTP server?
Loading...
3. Which of these method is used to find a URL from the cache of httpd?
Loading...
4. Which of these variables stores the number of hits that are successfully served out of cache?
Loading...
5. Which of these class is used for operating on request from the client to the server?
Loading...
6. Which of these method of httpd class is used to write UrlCacheEntry object into local disk?
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();
int len = obj1.getContentLength();
System.out.print(len);
}
}
Loading...
8. Which of these method is used to start a server thread?
Loading...
9. Which of these method is called when http daemon is acting like a normal web server?
Loading...
10. What is the output of this program?
import java.net.*;
class networking {
public static void main(String[] args) throws UnknownHostException {
InetAddress obj1 = InetAddress.getByName("cisco.com");
System.out.print(obj1.getHostName());
}
}
Loading...
Are these questions helpful for you?
Related Quizzes
- Introduction To Java
- Java Network Programming
- Java File Input Output
- Java Socket Programming
- Java Data Types
- Java Operators
- Java Strings
- Java Arrays
- Java Package And Interface
- java.lang Package
- Java Swings
- Java Applets
- Java Exception Handling
- JSP And Servlet
- Struts And Hibernate
- Java Session
- JDBC
- Java Classes And Methods
- Java Generics
- Java Multithreading
Comments: (Your feedback is valuable to us)