![]() |
cs506 quizzes |
"CS506 Quiz No. 1"
Multiple Choice Question
2 February 2021
Question No: 1
Which of the following range of response code indicates that request was successful? â–º 200-299
â–º 100-199
â–º 300-399
â–º 400-499
Question No: 2
Choose correct integer value for predefined Thread Priority "Thread MIN_PRIORITY" in Java. â–º 1 â–º 5 â–º 10 â–º 7.
Question No: 3
"Ready State" means a thread is in ______________.
â–º ready queue
â–º waiting state
â–º dead state
â–º new state
Question No: 4
Which of the following range of response code signify error by server?
â–º 500-599
â–º 400-499
â–º 200-299
â–º 300-399
Question No: 5
Which of the following approach can used to create in java?
â–º inheritance
â–º Composition
â–º Polymorphism
â–º Abstraction
Question No: 6
Which of the following is the main idea behind partition a web application into layers?
â–º Reduce Coupling
â–º increase Coupling
â–º increase Decoupling
â–º Reduce Decoupling
Question No: 7
Choose correct line of code to start a threat "t" in java.
â–º t.start()
â–º t->start()
â–º t-start()
â–º t=start()
Question No: 8
In include type of request dispatcher. the first servlet which received request is also responsible to _______.
â–º finish response
â–º forward request
â–º modify request
â–º show exceptions
Question No: 9
The _______ method is used, when one thread to wants to wait for another third's run method to complete its execution. â–º join() â–º wait() â–º yield() â–º sleep()
Question No: 10
After some amount of time, session object of HttpSession class gets terminated automatically. â–º True â–º False
"CS506 Quiz No. 1" (2)
Multiple Choice Question
2 February 2021
Question No: 1
Choose correct line of code to inherit a Worker class form thread class in java. â–º public class Worker extends Thread ()
â–º public class Worker inherit Thread ()
â–º public class Worker implement Thread ()
â–º public class Worker new Thread ()
Question No: 2
HTTP response code 404 indicates that ______________ .
â–º requested resource is not available (Not Found)
â–º requested resource is available
â–º error by server
â–º request requires HTTO authentication
Question No: 3
Java Servlets are Not automatically swatch to URL Rewriting when cookies are not supported or disable by the client.
â–º False
â–º True
Question No: 4
JSP uses println() statements to generate HTML.
â–ºFalse
â–ºTrue
Question No: 5
Content attribute are shared among ________ servlet/s of ________.
â–º all, a web application
â–º all, a desktop application
â–º two, a web application
â–º two, a desktop application
Question No: 6
Each web application has ______________ servlet context/s.
â–º 1
â–º 0
â–º 2
â–º 3
Question No: 7
Resources could be shared among all servlets in _____ application/s using _____. â–º same, ServletContext object
â–º same, Servlet object
â–º different, ServletContext object
â–º different, Servlet object
Question No: 8
â–º web xml is a___________.
â–º configuration file
â–º java file
â–º jar file
â–º servlet file
Question No: 9
if "MyServlet" is placed in "myapp" then you can acces "MyServlet" by writing ______ url in browser.
â–º http://localhost:8080/myapp/MyServlet
â–º http://localhost:8080/myapp/servlets/MyServlet
â–º http://localhost:8080/webapps/myapp/MyServlet
â–º http://localhost:8080/webapps/myapp/servlets/MyServlet
Question No: 10
Which of the following is NOT a part of HTTP request. â–º Status code â–º request method â–º URI â–º Header fields
"CS506 Quiz No. 1" (3)
Multiple Choice Question
2 February 2021
Question No: 1
Context attribute are shared among ________ servlet/s of ________.
â–º all, a web application
â–º all, a desktop application
â–º two, a web application
â–º two, a desktop application
Question No: 2
Which of the following is NOT true about HTTP?
â–º HTTP maintains user session between successive requests
â–º HTTP is a stateless protocol
â–º HTTP is a request response model
â–º HTTP has no built-in state management between successive request
Question No: 3 rep
Each web application has ______________ servlet context/s.
â–º 1
â–º 0
â–º 2
â–º 3
Question No: 4
Which of the following interface needs to implement which creating threads?
â–º Runnable
â–º Serializable
â–º ActionListener
â–º WindowListener
Question No: 5
Packages are nothing more than the way we organize files into different direction according to their functionality, usability as well as category then should belong to.
â–º True
â–º False
Question No: 6
Which of the following method allows any other thread of same priority to execute?
â–º Yield()
â–º notify()
â–º wait()
â–º sleep()
Question No: 7
In 3 layer architecture. We do NOT make any direct calls to database form the presentation layer.
â–º True
â–ºFalse
Question No: 8
The method "getid( )" of HttpSession class returns the unique identifier of the session.
â–º True
â–º False
Question No: 9
Choose correct integer value for predefined Thread Priority "Thread.MAX_PRIORITY" in Java.
â–º 10
â–º 1
â–º 5
â–º 7
Question No: 10 rep
Which of the following range of response code signify error by server?
â–º 500-599
â–º 400-499
â–º 200-299
â–º 300-399
"CS506 Quiz No. 2"
Multiple Choice Question
11 February 2021
Question No: 1
The correct way to define a JSP include action element is:
â–º <jsp:include page = "one.jsp"/>
â–º <jsp:include page @ "one.jsp"/>
â–º <jsp:include page # "one.jsp"/>
â–º <jsp:include page $ "one.jsp"/>
Question No: 2
By means of Page Directive, a JSP can be give the responsibility of an Error page.
â–º True
â–º False
Question No: 3
In context of JSP custom tags, is it true that a "Tag with Attributes" does Not have a body?
â–º True
â–º False
Question No: 4
In JSP scripting elements, it is NOT necessary that every opening tag also have a closing tag.
â–º False
â–º True
Question No: 5
JSP forward action elements to forward request to another resource.
â–º True
â–º False
Question No: 6
HTML comments are ________ in browser and JSP comments are _______ in browser.
â–º shown. hidden
â–º shown. shown
â–º hidden. hidden
â–º hidden, shown
Question No: 7
The correct way to call an error page in JSP is:
â–º <%@page ... errorPage = "error.jsp"%?
â–º <%@page ... isErrorPage = "error.jsp"%?
â–º <%@page ... setErrorPage = "error.jsp"%?
â–º <%@page ... getErrorPage = "error.jsp"%?
Question No: 8
In context JSP custom tags, a simple tag has a body.
â–º False
â–º True
Question No: 9
A single page is doing everything is eally a best approch while making of web application.
â–º False
â–ºTrue
Question No: 10
An error JSP is called by the website server when an uncaught exception gets occurred.
â–º True
â–º False
"CS506 Quiz No. 2" (2)
Multiple Choice Question
11 February 2021
Question No: 1 rep
Is true that a JavaBean class CAN NOT be easily reused and composed together in an application?
â–ºNo
â–ºYes
Question No: 2 rep
There is NO equivalent tag for comments while writing JSP scripting elements in XML.
â–º True
â–º False
Question No: 3 rep
In JSP scripting elements, it is NOT necessary that every opening tag also have a closing tag.
â–º False
â–º True
Question No: 4
In a JavaBean class, private values should be accessed through setters/getters.
â–º True
â–º False
Question No: 5 rep
An error JSP is called by the website server when an uncaught exception gets occurred.
â–º True
â–º False
Question No: 6
In context JSP custom tags, is it true that a "Tag with Body" must have one ormore attribute?
â–º False
â–º True
Question No: 7
The correct way to define a JSP forward action element is.
â–º <jsp:forward page = "one.jsp"/
â–º <jsp:forward page @ "one.jsp"/
â–º <jsp:forward page # "one.jsp"/
â–º <jsp:forward page $ "one.jsp"/
Question No: 8
A JavaBean class must have a zero argument constructor
â–º True
â–º False
Question No: 9
HTTP response code 401 indicates that ______________ .
â–ºIndicates that access to the requested resource has been denied.
â–º requested resource is available
â–º error by server
â–º request requires HTTO authentication
Question No: 10
The correct format of writing a declaration tag in JSP is;
â–º <%!Java code %>
â–º <%@Java code %>
â–º <%$Java code %>
â–º <%#Java code %>
"CS506 Quiz No. 2" (3)
Multiple Choice Question
11 February 2021
Question No: 1
The correct way to declare as an error page in JSP is:
â–º <%@page ... isErrorPage = "true"%?
â–º <%@page ... errorPage = "true"%?
â–º <%@page ... setErrorPage = "true"%?
â–º <%@page ... getErrorPage = "true"%?
Question No: 2
Is true that a JavaBean class CAN NOT be easily reused and composed together in an application?
â–ºNo
â–ºYes
Question No: 3
HTTP response code 401 indicates that ______________ .
â–ºIndicates that the request requires HTTP authentication
â–º requested resource is available
â–º error by server
â–º request requires HTTO authentication
Question No: 4
JSP directives are used to convey special processing information about the page to JSP container.
â–º True
â–º False
Question No: 5
Is it true that a JavaBean class can have any public instance variables/attributes?
â–º No
â–º Yes
Question No: 6
A single page is doing everything that is really a best approach while making of web applications.
â–º False
â–º True
Question No: 7
There is NO equivalent tag for comments while writing JSP scripting elements in XML.
â–º True
â–º False
Question No: 8
Which one of the following JavaBean's scope attribute has local value?
â–º Page
â–º Request
â–º Session
â–º Application
Question No: 9
Is it true that Enterprise Applications need to support multiple type of user with multiple types of interface?
â–º Yes
â–º No
Question No: 10
JSP is a text based document capable of returning either static or dynamic content to a client's browser.
â–º True
â–º False
Best of Luck
YouTube Link:
https://www.youtube.com/c/VUEDUCATIONS
Facebook Page Link:
https://www.facebook.com/Vu-education-100866618120553/
WhatsApp Group Link:
https://chat.whatsapp.com/KEa5lP65yMdEF8BnmkC8jN
Tags
cs506 quiz 1 solution 2021, cs506 quiz 2 solution 2021, cs506 quiz 2 solve,
vu education, virtual university, vu, vu past papers,"
#virtual university, #vu #cs506quizsolution2021 #cs506quizsolution #cs506
#cs506quiz1solve #cs506quiz2solve #vueducation
0 Comments