Order PDF of any content from our website with a little minor Fee to donate for hard work. Online MCQs are fully free but PDF books are paid. For details: contact whatsapp +923028700085 Important notes based PDF Books are available in very little price, starting from 500/-PKR; Order Now: contact whatsapp +923028700085

VU Past Papers CS506 – Java & HTTP Midterm Most important Solved

Q1: Which of the following is NOT a part of HTTP request?
(A) Request method
(B) URI
(C) Status code
(D) Header fields
Answer: (C) Status code

Q2: Which of the following method needs to override while handling threads in Java?
(A) init()
(B) start()
(C) run()
(D) runnable()
Answer: (C) run()

Q3: Which of the following problem occurs with lower priority threads?
(A) Race condition
(B) Starvation
(C) Average waiting time
(D) Process death
Answer: (B) Starvation

Q4: Which of the following is NOT a web technology of Java?
(A) Servlet
(B) JSP
(C) ASP
(D) JSF
Answer: (C) ASP

Q5: Which of the following interface needs to implement while creating threads?
(A) Serializable
(B) Runnable
(C) ActionListener
(D) WindowListener
Answer: (B) Runnable

Q6: Which of the following approach is used to create threads in Java?
(A) inheritance
(B) interface
(C) Both inheritance and interface
(D) None of these
Answer: (C) Both inheritance and interface

Q7: Which of the following method allows any other thread of same priority to execute?
(A) sleep()
(B) wait()
(C) notify()
(D) yield()
Answer: (D) yield()

Q8: Which of the following Environment variable tells the system about the root directory of TOMCAT?
(A) JAVA_HOME
(B) CATALINA_HOME
(C) CLASSPATH
(D) PATH
Answer: (B) CATALINA_HOME

Q9: Which of the following is NOT true about HTTP?
(A) HTTP is a stateless protocol
(B) HTTP is a request-response communication model
(C) HTTP maintains user session between successive requests
(D) HTTP has no built-in state management between successive requests
Answer: (C) HTTP maintains user session between successive requests

Q10: Which of the following range of response code signify error by server?
(A) 200-299
(B) 300-399
(C) 400-499
(D) 500-599
Answer: (D) 500-599

Q11: Web.xml is a:
(A) java file
(B) configuration file
(C) jar file
(D) servlet
Answer: (B) configuration file

Q12: Which of the following folder contains configuration file?
(A) classes
(B) lib
(C) bin
(D) WEB-INF
Answer: (D) WEB-INF

Q13: Which of the following method call causes the currently executing thread to return to Ready state?
(A) sleep()
(B) yield()
(C) wait()
(D) None of these
Answer: (B) yield()

Q14: Which of the following range of response code indicates that request was successful?
(A) 100-199
(B) 200-299
(C) 300-399
(D) 400-499
Answer: (B) 200-299

Contents Copyrights Reserved By T4Tutorials