ADS

CS506 Quizzes | CS506 Quizzes | CS506 Quiz 1 and 2 Solved

CS506
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 solution 2021, cs506. cs506 quiz 1 solve
cs506 quiz 1 solution 2021, cs506 quiz 2 solution 2021, cs506 quiz 2 solve,
vu education, virtual university, vu, vu past papers,"

Hashtag

#virtual university, #vu  #cs506quizsolution2021 #cs506quizsolution #cs506

#cs506quiz1solve #cs506quiz2solve #vueducation



Post a Comment

0 Comments