<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[CS506 MCQ&#x27;s Final Term Paper]]></title><description><![CDATA[<ol>
<li>JSP ____________ action element is used to obtain a reference to an existing JavaBean object.</li>
</ol>
<p dir="auto">Select correct option:<br />
useBean<br />
setProperty<br />
getProperty<br />
None of these<br />
Question:2<br />
When JSP page compiled, it is translated into?<br />
Select correct option:<br />
Applet<br />
Application<br />
Servlet<br />
Web Browser<br />
Question:3<br />
Hidden Forms Fields contain the information that is needed to send to the<br />
Select correct option:<br />
Client<br />
Server<br />
Both server and client<br />
Neither server nor client<br />
Question:4<br />
Which of the following is used to work with javaBean to include pages at request time and<br />
forward request to other sources?<br />
Select correct option:<br />
JSP action element<br />
JSP declaration<br />
Scriptlets<br />
JSP expression<br />
Question:5<br />
To define the error page in JSP we use following tag?<br />
Select correct option:<br />
exception-type<br />
error-type<br />
error-page<br />
exception-page</p>
<p dir="auto">Question:6<br />
setAttribute(String, Object) associates a ----------with a name.<br />
Select correct option:<br />
Value<br />
Object<br />
String<br />
Both String and Object<br />
Question:7<br />
“application” is a object of<br />
Select correct option:<br />
ServletContext<br />
HttpSession<br />
ServletConfig<br />
Both ServletConfig and HttpSession<br />
Question:8<br />
JSP comments are declared through following tag<br />
Select correct option:<br />
&lt;%@ %&gt;<br />
&lt;%-- --%&gt;<br />
&lt;%! %&gt;<br />
&lt;%= %&gt;<br />
Question:9<br />
Which of the following is NOT true about JavaBean?<br />
Select correct option:<br />
It should not have any public variable.<br />
It must be serializable.<br />
It must not have any zero argument constructor.<br />
Private instances must be accessed via setters/getters.<br />
Question:10<br />
JSP page is a ---------------document that describes how to process a request to create a response.<br />
Select correct option:<br />
Text-based<br />
xml-based<br />
Both text-based and xml-based<br />
Neither xml-based nor Text-based</p>
<p dir="auto">Question:11<br />
From the following which is not a basic function of web-based application:<br />
Select correct option:<br />
Presentation<br />
Debugging<br />
Business Logic<br />
Data Management<br />
Question:12<br />
Client is referred as a<br />
Select correct option:<br />
Computer user<br />
Computer that a person is using for communication purpose<br />
Person which carry out web surfing<br />
None of these<br />
Question:13<br />
To destroy the session in Servlet we use?<br />
Select correct option:<br />
session.destroy()<br />
session.invalidate()<br />
session.end()<br />
session.Kill()<br />
Question:14<br />
“application” is a object of<br />
Select correct option:<br />
ServletContext<br />
HttpSession<br />
ServletConfig<br />
Both ServletConfig and HttpSession<br />
Question:15<br />
Which of the following is NOT a JSP action element?<br />
Select correct option:<br />
useBean<br />
setProperty<br />
getProperty<br />
javaBean</p>
<p dir="auto">Question:16<br />
From the following indicators; which is added in user session to know the session time out?<br />
Select correct option:<br />
Sessiontimeoutindicator<br />
SessionTimeOutIndicator<br />
SessionTimeoutIndicator<br />
sessionTimeOutIndicator<br />
Question:17<br />
From following which one is the object of JspWriter used to send output to the client.<br />
Select correct option:<br />
request<br />
out<br />
response<br />
Both request and response<br />
Question:18<br />
Which of the following is NOT true about JavaBean?<br />
Select correct option:<br />
It should not have any public variable.<br />
It must be serializable.<br />
It must not have any zero argument constructor.<br />
Private instances must be accessed via setters/getters.<br />
Question:19<br />
Relationship between JSP and servlets is<br />
Select correct option:<br />
Servlets are built on JSP semantics and all servlets are compiled to JSP pages for runtime<br />
usage<br />
JSP and servlets are unrelated technologies<br />
Servlets and JSP are competing technologies for handling web requests. Servlets are<br />
being superseded by JSP, which is preferred. The two technologies are not useful in<br />
combination<br />
JSPs are built on servlet semantics and all JSPs are compiled to servlets for runtime usage<br />
Question:20<br />
getId( ) returns the unique ID of<br />
Select correct option:<br />
Current session<br />
Previous session<br />
Next session<br />
Both Next and Previous session</p>
<p dir="auto">Question:21<br />
Which of the following is used to work with javaBean to include pages at request time and<br />
forward request to other sources?<br />
Select correct option:<br />
JSP action element<br />
JSP declaration<br />
Scriptlets<br />
JSP expression<br />
Question:22<br />
Packages are the way to organize files into different -------------according to their functionality,<br />
usability as well as category they should belong to.<br />
Select correct option:<br />
Directories<br />
Folders<br />
Libraries<br />
Both Folders and Libraries<br />
Question:23<br />
getAttribute(String) extracts----------- stored value from a session object<br />
Select correct option:<br />
Subsequently<br />
Currently<br />
Previously<br />
Both Currently and Subsequently<br />
Question:24<br />
What is the initial contact point for handling a web request in a Page-Centric architecture?<br />
Select correct option:<br />
JSP page<br />
JavaBean<br />
servlet<br />
HTML page<br />
Question:25<br />
From the following methods, which method cannot be overridden in the JSP page<br />
Select correct option:<br />
_jspService()<br />
jspDestroy()<br />
jspInit()<br />
Both jspDestroy()and jspInit()</p>
<p dir="auto">Question:26<br />
JSP ____________ action element is used to obtain a reference to an existing JavaBean object.<br />
Select correct option:<br />
useBean<br />
setProperty<br />
getProperty<br />
None of these<br />
Question:27<br />
In JSP Instance variables and method are declared through following tag<br />
Select correct option:<br />
&lt;%@ %&gt;<br />
&lt;%-- --%&gt;<br />
&lt;%! %&gt;<br />
&lt;%= %&gt; (not sure)<br />
Question:28<br />
All -----------data is kept at the application server.<br />
Select correct option:<br />
Dynamic<br />
Static<br />
Both dynamic and static<br />
Neither Static nor Dynamic<br />
Question:29<br />
A java program that has some design conventions is called_________?<br />
Select correct option:<br />
Java servlet<br />
JSP<br />
JSF<br />
JavaBean<br />
Question:30<br />
A cookie is a piece of ------- that a web server can store on a client’s hard disk.<br />
Select correct option:<br />
Text<br />
Number<br />
String<br />
Both Number and String</p>
<p dir="auto">Question:32<br />
Which of the following Environment variable tells the system about the root directory of TOMCAT?<br />
Select correct option:<br />
JAva_HOME<br />
CATALINA_HOME<br />
CLASSPATH<br />
PATH<br />
Question:33<br />
Which of the following statement is correct to assign maximum priority to thread “t2”?<br />
Select correct option:<br />
t2.setPriority(Thread.PRIORITY_MiX);<br />
t2.setPriority(Thread.PRIORITY_MAX)<br />
t2.setPriority(Thread.MAX_PRIORITY);<br />
t2.setPriority(Thread.MIX_PRIORITY);<br />
Question:34<br />
Which of the following object contains information specific to a servlet?<br />
Select correct option:<br />
ServletContext<br />
ServletConfig<br />
ServletRequest<br />
ServletResponse<br />
Question:35<br />
Which of the following range of response code signify error by server?<br />
Select correct option:<br />
200-299<br />
300-399<br />
400-499<br />
500-599<br />
Question:36<br />
From the following which ID is transmitted between the client and the server<br />
Select correct option:<br />
Session ID<br />
Network ID<br />
Server ID<br />
None of these<br />
Question:37<br />
Which of the following is NOT a web technoloy of Java?<br />
Select correct option:<br />
Servlet<br />
JSP<br />
ASP<br />
JSF<br />
Question:38<br />
Moving session from one server to another in case of server failure is known as<br />
Select correct option:<br />
Session Migration<br />
Session Tracking<br />
Session Hijacking<br />
Both Session Hijacking and Tracking<br />
Question:39<br />
Which one is used to collect data when a user navigates between web pages?<br />
Select correct option:<br />
Session Tracking<br />
User Tracking<br />
Session Migration<br />
Both User Tracking and Session Migration<br />
Question:40<br />
Which of the following method allows any other thread of same priority to execute?<br />
Select correct option:<br />
sleep()<br />
wait()<br />
notify()<br />
yield()<br />
Question:41<br />
From the following which session tracking technique is used when new session is started?<br />
Select correct option:<br />
Cookies<br />
URL Rewriting<br />
Both Cookies and URL Rewriting<br />
None of these<br />
Question:42<br />
Which of the following object is used for sharing resources among different servlets of same<br />
application?<br />
Select correct option:<br />
ServletConfig<br />
ServletRequest<br />
ServletResponse<br />
ServletContext<br />
Question:43<br />
Which of the following interface needs to implement while creating threads?<br />
Select correct option:<br />
Serializable<br />
Runnable<br />
ActionListener<br />
WindowListener</p>
<p dir="auto">Question:44<br />
Session Tracking is done through following techniques?<br />
Select correct option:<br />
Cookies<br />
Hidden fields<br />
URL Rewriting<br />
Cookies, Hidden fields and URL Rewriting<br />
Question:45<br />
Servlets are used to<br />
Select correct option:<br />
Create graphics<br />
Provide dynamic web contents which extend web servers<br />
Develop applets<br />
Create GUI<br />
Question:46<br />
Which of the following is/are not correct about Thread(s)?<br />
Select correct option:<br />
Light weight<br />
Heavy weight<br />
Share same memory<br />
Light weight and share same memory<br />
Question:47<br />
From following which code can be used to create session object in the Servlet:<br />
Select correct option:<br />
HttpSession session = req.getSession(true);<br />
HttpSession session = req.getSession(false);<br />
HttpSession session = req.getSession(1);<br />
HttpSession session = req.setSession(1);<br />
Question:48<br />
JVM assigns CPU to the threads based on __________.<br />
Select correct option:<br />
Thread priorities<br />
System priorities<br />
Collective priorities<br />
Both System and Collective priorities<br />
Question:49<br />
Which of the following method is called only once during life cycle of Servlet?<br />
Select correct option:<br />
service()<br />
init()<br />
destroy()<br />
start()<br />
Question:50<br />
HTTP is a ---------protocol.<br />
Select correct option:<br />
Stateless<br />
Connectionless<br />
Connection oriented<br />
Both Connectionless and Stateless<br />
Question:51<br />
Which of the following is NOT true about HTTP?<br />
Select correct option:<br />
HTTP is a stateless protocol<br />
HTTP is a request response communication model<br />
HTTP maintains user session between successive requests.<br />
HTTP has no built-in state management between successive requests.<br />
Question:52<br />
Why we use RequestDispatcher to forward a request to another resource(servlet, html, jsp), instead of<br />
using a sendRedirect()?<br />
Select correct option:<br />
sendRedirect() is not supported in servlet API.<br />
RequestDispatcher is not supported in servlet API.<br />
RequestDispatcher is efficient and allows the server to maintain request status.<br />
None of these not sure<br />
Question:53<br />
getParameters() method returns an array of strings containing the values for a specified servlet<br />
parameter.<br />
Select correct option:<br />
True<br />
False<br />
Question:54<br />
Which of the following is not the part of http response?<br />
Select correct option:<br />
Result Code<br />
Header files<br />
Status code<br />
URI<br />
Question:55<br />
web.xml is a ___________<br />
Select correct option:<br />
java file<br />
configuration file<br />
jar file<br />
servlet file</p>
<p dir="auto">Question:56<br />
A ______ is a small text file used by servers to store pieces of data on a client for later retrieval.<br />
Select correct option:<br />
session<br />
cookie<br />
URL rewriting<br />
Session object<br />
Question:57<br />
HttpSession stores session information in<br />
Select correct option:<br />
File system of client<br />
File system of server<br />
A cookie<br />
A session object not sure<br />
Question:58<br />
Which of the following is NOT a part of HTTP request?<br />
Select correct option:<br />
Request method<br />
URI<br />
Status code<br />
Header fields<br />
Question:59<br />
Which of the following folder contains configuration file?<br />
Select correct option:<br />
classes<br />
lib<br />
bin<br />
WEB-INF<br />
Question:60<br />
Which of the following problem occurs with lower priority threads?<br />
Select correct option:<br />
Race condition<br />
Starvation<br />
Average waiting time<br />
Process death<br />
Question:61<br />
Which of the following approch is used to create threads in java?<br />
Select correct option:<br />
inheritance<br />
interface<br />
Both inheritance and interface<br />
None of these</p>
<p dir="auto">Question:62<br />
Which of the following method needs to override while handling threads in java?<br />
Select correct option:<br />
init()<br />
start()<br />
run()<br />
runnable()<br />
Question:63<br />
From the following packages which one is used to write the servlets?<br />
Select correct option:<br />
javax<br />
java<br />
java.util<br />
java.lang<br />
Question:64<br />
Servlets are used to<br />
Select correct option:<br />
Create graphics<br />
Provide dynamic web contents which extend web servers<br />
Develop applets<br />
Create GUI<br />
Question:65<br />
getrequest() method gets information from a client and postrequest() method posts data to a<br />
client.<br />
Select correct option:<br />
False<br />
True<br />
Question:66<br />
JSP scripting elements is/are<br />
Select correct option:<br />
Declarations<br />
Scriptlets<br />
expressions<br />
All of these<br />
Question:67<br />
From following methods; which method is not a part of the JSP life cycle?<br />
Select correct option:<br />
jspInit()<br />
jspService()<br />
_jspService()<br />
jspDestroy()</p>
<p dir="auto">Question:68<br />
From the following which one is not a JSP directive?<br />
Select correct option:<br />
page<br />
include<br />
taglib<br />
out<br />
Question:69<br />
To provide global control of JSP we use following tag<br />
&lt;%@ %&gt; right Answer)<br />
&lt;%-- -%&gt;<br />
&lt;%! %&gt;<br />
&lt;%= %&gt;<br />
Question:70<br />
javax.servlet.jsp.PageContext, is used to give a ---------point of access to many of the page<br />
attributes.<br />
Select correct option:<br />
Single<br />
Multiple<br />
Question:71<br />
In JSP Instance variables and method are declared through following tag<br />
Select correct option:<br />
&lt;%@ %&gt;<br />
&lt;%-- --%&gt;<br />
&lt;%! %&gt;<br />
&lt;%= %&gt;<br />
Question:72<br />
Which of the following approach is also called page-with-bean approach.<br />
Select correct option:<br />
Page-Centric approach<br />
MVC Model1<br />
MVC Model2<br />
MVC Model3</p>
<p dir="auto">Question:73<br />
A separate controller is a part of which of the following approach?<br />
Select correct option:<br />
Page-Centric approach<br />
MVC Model1<br />
MVC Model2<br />
MVC Model3<br />
Question:74<br />
From following tags, which one is the Special JSP tag?<br />
Select correct option:<br />
&lt;jsp: .…. /&gt;<br />
&lt;%! %&gt;<br />
&lt;%= %&gt;<br />
&lt;%@ %&gt;<br />
Question:75<br />
JSTL stands for __<em><strong><strong><strong>.<br />
JavaServer Pages Standard Tag Library<br />
JavaSrvlet Pages Standard Tag Library<br />
Java Pages Standard Tag Library<br />
Question:76<br />
JSP page is a ---------------document that describes how to process a request to create a response.<br />
Text<br />
XML<br />
Both<br />
None<br />
Question:77<br />
A java program that has some design conventions is called</strong></strong></strong></em><br />
java sevlet<br />
jsp<br />
jsf<br />
javabean</p>
<p dir="auto">Question:78<br />
Which of the following is not included in simple tag while creating JSP custom tags?<br />
Select correct option:<br />
Start of tag<br />
End of tag<br />
Attributes<br />
None of these<br />
Question:79<br />
Which of the following represent state of the components in MVC?<br />
Model<br />
View<br />
Control<br />
Both Model and View<br />
Question:80<br />
A user defined component that is used to perform certain action is called______.<br />
Select correct option:<br />
Built-in Tags<br />
JSP action element<br />
Custom tag not sure<br />
jsp:useBean<br />
Question:81<br />
A Tier represents the _______ view of application.<br />
Select correct option:<br />
Physical<br />
Logical<br />
Biological<br />
Local<br />
Question:82<br />
Which of the following is the best choice as a controller in MVC Model Architecture?<br />
Select correct option:<br />
Java<br />
Servlet<br />
JavaScript<br />
JSP</p>
<p dir="auto">Question:83<br />
. The HTTP response values in the range __________ specify that the request was successful.<br />
100-199<br />
200-299<br />
300-399<br />
400-499<br />
Question:84<br />
With the help of _____________ we can better organize our files into different directories.<br />
Classes<br />
Interfaces<br />
Session<br />
Packages<br />
Question:85<br />
. Entire JSP page gets translated into a servlet ____________.<br />
Once (pg 323)<br />
Every time when it is accessed<br />
Every time when the page is refreshed<br />
Every time when the browser is restarted<br />
Question:86<br />
A bean class ___________ have a zero argument constructor.<br />
Can<br />
Can’t<br />
Must (pg 356)<br />
Shouldn’t<br />
Question:87<br />
. Layers represent the _____________ view of application.<br />
Physical<br />
Logical (pg 435)<br />
External<br />
None of these<br />
Question:88<br />
High coupling makes classes difficult or impossible to reuse because _____________.<br />
They are independent of other classes<br />
They depend on so many other classes<br />
They have limited functionality<br />
They are not properly implemented<br />
Question:89<br />
_____________ is a standard web based application framework.<br />
Java</p>
<p dir="auto">Servlet<br />
JSP<br />
JSF<br />
Question:90<br />
Which of the following is a correct order for Bean scope in JSP page from most visible to least<br />
visible?<br />
application, session, request, page<br />
page, request, session, application<br />
session, page, request, application<br />
application, session, page, request<br />
Question:91<br />
The dot operator in Expression Language is typically used for accessing the --------------------of<br />
an object.<br />
Properties (pg 458)<br />
Elements<br />
Values<br />
Attributes<br />
Question:92<br />
Initialization parameters of a servlet are defined in __________ file.<br />
html<br />
JSP<br />
web.xml (pg 275)<br />
servlet<br />
Question:93<br />
On every request from the client, the server creates a new ________ and calls the _______<br />
method.<br />
thread, service()<br />
thread, init()<br />
process, service()<br />
process, init()<br />
Question:94<br />
. By ____________, the original request can be forwarded to the next servlet.<br />
request dispatching<br />
response redirection<br />
both request dispatching and response redirection<br />
None of the given options<br />
Question:95<br />
Which of the following is NOT appropriate for Page-centric approach?<br />
The maintenance of the application becomes a nightmare.</p>
<p dir="auto">A lot of code is also get duplicated.<br />
Scaling of such kind of application is easy. (pg 397)<br />
The code becomes a mixture of presentation, business and data access logic.<br />
Question:96<br />
Which of the following ‘statement’ object is used for executing precompiled SQL statements?<br />
Statement<br />
PreparedStatement (pg 147)<br />
CallableStatement<br />
None of the given options<br />
Question:97<br />
RPC stands for<br />
Remote Personal Computer (RPC)<br />
Remote Procedure Client<br />
Remote Procedure Calls (RPC).<br />
None of the given options<br />
Question:98<br />
. UDDI stands for<br />
Universal Description, Discovery &amp; Integration (UDDI) (pg490)<br />
Universal Data, Discovery &amp; Integration (UDDI)<br />
Universal Data, Database &amp; Integration (UDDI)<br />
None of the given options<br />
Question:99<br />
Managed Beans have _______ Model<br />
Declarative<br />
Sequential<br />
Iterative<br />
None of the given options (pg465) Managed beans represent the data model<br />
Question:100<br />
DataBaseMetaData object can be derived from ___________ object.<br />
ResultSet<br />
Connection (pg165)<br />
Statement<br />
ResultSetMetaData<br />
Question:101<br />
DSN stands for ___________.<br />
Domain System Name<br />
Data Source Name (pg150)<br />
Database System Name<br />
Database Simple Name</p>
<p dir="auto">Question:102<br />
From following functions which function is invoked first?<br />
paint()<br />
paintComponet( )<br />
paintBorder( )<br />
paintChildern( )<br />
Question:103<br />
There is/are _____ form(s) of response redirection.<br />
1<br />
2 (pg 270)<br />
3<br />
4<br />
Question:104<br />
Expression is a code fragment which returns ___________.<br />
Integer<br />
String (pg326)<br />
Depends on the expression<br />
Nothing<br />
Question:105<br />
The dot operator in Expression Language is typically used for accessing the --------------------of<br />
an object.<br />
Properties (pg458)<br />
Elements<br />
Values<br />
Attributes<br />
Question:106<br />
The sleep(int time) method causes the currently executing thread to wait for the time specified<br />
in --------------<br />
Milliseconds (pg221)<br />
Nenoseconds<br />
Seconds<br />
Minutes<br />
Question:107<br />
Java was developed in………<br />
1990<br />
1994<br />
1995<br />
1996</p>
<p dir="auto">Question:108<br />
CREATE TABLE, DROP TABLE, and ALTER TABLE etc are -----------.<br />
DML statements<br />
DDL statements(pg144)<br />
DCL statements<br />
None of given options<br />
Question:109<br />
Extra sheet can be appended to URL using _________<br />
i. Extra path information<br />
ii. Added Parameters<br />
iii. Custom Change<br />
iv. All of the given options<br />
Question:110<br />
Initialization ________ of web application are also called ______________<br />
i. Parameters, Context Attributes not sure<br />
ii. Context Attributes, Parameters<br />
iii. Parameters, Variables<br />
iv. Context Attributes, Variables<br />
Question:111<br />
J2EE is developed for which of the following application<br />
i. Very large applications<br />
ii. GUI based applications<br />
iii. Mobile devices<br />
iv. Network based applications<br />
Question:112<br />
ODBC stands for ______________<br />
i. Open database communication<br />
ii. Open database connection<br />
iii. Open database connectivity<br />
iv. Open database Commission<br />
Question:113<br />
Which of the following command is used to compile Java code?<br />
i. java filename<br />
ii. javac filename.java<br />
iii. javac filename<br />
iv. java filename.java</p>
<p dir="auto">Question:114<br />
What if the main method is declared as private?</p>
<ol>
<li>The program does not compile</li>
<li>The program compiles but does not run</li>
<li>The program compiles and runs properly</li>
<li>The program throws an exception on compile time<br />
Question:115<br />
Java program code is compiled into form called</li>
<li>Machine code</li>
<li>native Code</li>
<li>Byte Code</li>
<li>Source Code<br />
Question:116<br />
A top level class without any modifier is accessible to</li>
<li>any class</li>
<li>any class within the same package</li>
<li>any class within the same file</li>
<li>any subclass of this class<br />
Question:117<br />
Overloading is _______ whereas overriding is _____</li>
<li>Run time binding, compile time binding</li>
<li>Late binding, compile time binding</li>
<li>Compile time binding, run time binding</li>
<li>Run time binding, late time binding<br />
Question:118<br />
Static methods only access ___</li>
<li>instance variable</li>
<li>instance method</li>
<li>static variables and methods</li>
<li>both static and instance members<br />
Question:119<br />
Which of the following is modifier is provided by default if no access is written explicitly?</li>
<li>public</li>
<li>Private</li>
<li>Protected</li>
<li>Default<br />
Question:120<br />
A top level class may have only the following access modifier.</li>
<li>Package</li>
<li>Private</li>
<li>Protected</li>
<li>Public</li>
</ol>
<p dir="auto">Question:121<br />
Which of the following is used for inheritance in java?</p>
<ol>
<li>implements</li>
<li>extends</li>
<li>: (colon)</li>
<li>inherit<br />
Question:122<br />
A collection can store …</li>
<li>Homogenous objects</li>
<li>Heterogeneous objects</li>
<li>Objects as well as primitive values</li>
<li>At most 100 objects<br />
Question:123<br />
Window frame and dialog use ________ as their default layout.</li>
<li>Border layout</li>
<li>Flow layout</li>
<li>GridBag layout</li>
<li>Grid layout<br />
Question:124<br />
There are _________ types of exceptions in Java</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5<br />
Question:125<br />
Which of the following belongs to a category of checked exception?</li>
<li>Null Pointer exception</li>
<li>IOException</li>
<li>Array index out of bounds</li>
<li>NumberFormatException<br />
Question:126<br />
Which of the following exception belongs to a category of un-checked exception?</li>
<li>IOException</li>
<li>Null Pointer exception</li>
<li>AWTException</li>
<li>ClassNotFoundException</li>
</ol>
<p dir="auto">Question:127<br />
All the exceptions and errors in java are inherited from _____ class.</p>
<ol>
<li>Exception</li>
<li>Error</li>
<li>Throwable</li>
<li>IOException<br />
Question:128<br />
Exceptions must be handled while handling files otherwise it may lead to _____</li>
<li>Logical error</li>
<li>Syntax error</li>
<li>Run-time error</li>
<li>No error<br />
Question:129<br />
Which of the following package needs to be import while handling files?</li>
<li>java.util</li>
<li><a href="http://java.io" target="_blank" rel="noopener noreferrer nofollow ugc">java.io</a></li>
<li>java.awt</li>
<li>javax.swing<br />
Question:130<br />
When defining a method you must include a/an … to declare any exception that<br />
might be thrown but is not caught in the method:</li>
<li>try block</li>
<li>finally block</li>
<li>catch block</li>
<li>throws clause<br />
Question:131<br />
Which of the following syntax is used to attach an input stream to console ?</li>
<li>FileReader fr = new FileReader(’ input.txt ') ;</li>
<li>FileReader fr = new FileReader(<a href="http://FileDescriptor.in" target="_blank" rel="noopener noreferrer nofollow ugc">FileDescriptor.in</a>);</li>
<li>FileReader fr = new FileReader(FileDescriptor);</li>
<li>FileReader fr = new FileReader(console);<br />
Question:132<br />
The classes which contain the word _____ are byte oriented streams.</li>
<li>Reader</li>
<li>Writer</li>
<li>Stream</li>
<li>Byte</li>
</ol>
<p dir="auto">Question:133<br />
Which of the following stream read/write data in the form of bytes?</p>
<ol>
<li>FileReader</li>
<li>FileWriter</li>
<li>PrintWriter</li>
<li>FileInputStream<br />
Question:134<br />
Which of the following is called ’ pure abstract class ’ ?</li>
<li>Concrete class</li>
<li>Wrapper class</li>
<li>Interface</li>
<li>Abstract class with no abstract method<br />
Question:135<br />
Which of the following is true about abstract class?</li>
<li>An abstract class must have all methods declared as abstract methods.</li>
<li>A class must have at least one abstract method to be an abstract class.</li>
<li>A class without any abstract method can be declared as abstract class.</li>
<li>An instance of abstract class can be created.<br />
Question:136<br />
Which of the following stream is a filter stream?</li>
<li>FileWriter</li>
<li>FileReader</li>
<li>BufferedReader</li>
<li>All of given options<br />
Question:137<br />
An instance of abstract class cannot be created.</li>
<li>TRUE</li>
<li>FALSE<br />
Question:138<br />
Anabstractclass ---------------instantiated.</li>
<li>Cannot be</li>
<li>Can be</li>
<li>Must</li>
<li>None of these<br />
Question:139<br />
The relationship between class and interface is called ________</li>
<li>’ Is a ’ relationship</li>
<li>’ Has a ’ relationship</li>
<li>’ Responds to ’ relationship</li>
</ol>
<p dir="auto">Question:140<br />
BorderLayout is the default layout manager for a JFrame content pane</p>
<ol>
<li>TRUE</li>
<li>FALSE<br />
Question:141<br />
Which of the following is a general purpose container?</li>
<li>JFrame</li>
<li>Dialog</li>
<li>JPanel</li>
<li>JApplet<br />
Question:142<br />
JPanel and Applet use ________ as their default layout.</li>
<li>Flow layout</li>
<li>Border layout</li>
<li>Grid layout</li>
<li>GridBag layout<br />
Question:143<br />
Which of the following is true about AWT and SWING components?</li>
<li>AWT components creates a process whereas SWING component creates a<br />
thread.</li>
<li>AWT components creates a thread whereas SWING component creates a<br />
process.</li>
<li>Both AWT and SWING component creates a process.</li>
<li>Both AWT and SWING component creates a thread.<br />
Question:144<br />
Which of the following function will be used to register event handler with events<br />
generator (button)?</li>
<li>addAction()</li>
<li>addActionListener()</li>
<li>addListener()</li>
<li>registerListener()<br />
Question:145<br />
Event source can have --------- listeners registered on it.</li>
<li>Single</li>
<li>Double</li>
<li>Triple</li>
<li>Multiple</li>
</ol>
<p dir="auto">Question:146<br />
If a class needs to handle events generated by button then which of the following<br />
interface a class needs to implement?</p>
<ol>
<li>ComponentListener</li>
<li>KeyListener</li>
<li>MouseListener</li>
<li>ActionListener<br />
Question:147<br />
Which of the following function is declared in MouseMotionListener interface?<br />
public void mousePressed (MouseEvent me);</li>
<li>public void mouseDragged (MouseEvent me);</li>
<li>public void mouseClicked (MouseEvent me);</li>
<li>public void mouseEntered (MouseEvent me);<br />
Question:148<br />
WindowListener interface contains _______ methods.</li>
<li>Four</li>
<li>Six</li>
<li>Seven</li>
<li>Eight<br />
Question:149<br />
Mouse events can be trapped for ________ GUI component.</li>
<li>JPanel</li>
<li>JFrame</li>
<li>JButton</li>
<li>All of given<br />
Question:150<br />
Adapter classes have been defined for listener interfaces except ______ interface.</li>
<li>MouseListener</li>
<li>KeyListener</li>
<li>WindowListener</li>
<li>ActionListener<br />
Question:151<br />
Which of the following package needs to import while interacting with relational<br />
database?</li>
<li><a href="http://java.io" target="_blank" rel="noopener noreferrer nofollow ugc">java.io</a></li>
<li>java.sql</li>
<li>javax.swing</li>
<li>java.awt</li>
</ol>
<p dir="auto">Question:152<br />
Which of the following method is used to execute SELECT SQL statements?</p>
<ol>
<li>executeUpdate(sql);</li>
<li>ExecuteUpdate(sql);</li>
<li>executeQuery(sql);</li>
<li>ExecuteQuery(sql);<br />
Question:153<br />
Which of the following method is used to execute INSERT, UPDATE and Delete SQL<br />
statements?</li>
<li>executeQuery(sql);</li>
<li>ExecuteQuery(sql);</li>
<li>executeUpdate(sql);</li>
<li>ExecuteUpdate(sql);<br />
Question:154<br />
Which of the following statement object is used to execute stored procedures?</li>
<li>Statement</li>
<li>PreparedStatement</li>
<li>CallableStatement</li>
<li>None of given options<br />
Question:155<br />
HahMap takes key as a/an _________</li>
<li>Object</li>
<li>Array</li>
<li>Primitive value</li>
<li>Function<br />
Question:156<br />
A …defines the way and method of communication between two parties</li>
<li>Compiler</li>
<li>Protocol</li>
<li>Tool</li>
<li>Technique<br />
Question:155<br />
To create DataBaseMetaData object we write following line of code<br />
DataBaseMetaData db = con.getMeataData();</li>
<li>ResultSetMetaData rsmd = rs.getMetaData();</li>
<li>ResultSetMetaData rsmd = rs.setMetaData();</li>
<li>DataBaseMetaData db = con.setMeataData();</li>
</ol>
<p dir="auto">Question:156<br />
Which of the following are passed as an argument to the paint () method:</p>
<ol>
<li>A Canvas object2. A Graphics object3. An Image object4. A paint objectQuestion:157<br />
The code below draws a line. What color is the<br />
line?g.setColor(Color.red.green.yellow.red);g.drawLine(0, 0, 100,100);</li>
<li>Red</li>
<li>Green</li>
<li>Yellow</li>
<li>Black<br />
Question:158<br />
Which of the following methods are invoked by the AWT to support paint and repaint<br />
operations?</li>
<li>paint( )</li>
<li>repaint( )</li>
<li>draw( )</li>
<li>redraw( )<br />
Question:159<br />
If a super class method is protected then overriding method _________</li>
<li>must be protected</li>
<li>must be public</li>
<li>must be private</li>
<li>may be either protected or public<br />
Question:160<br />
Socket is a --------------communication channel between hosts.</li>
<li>Uni-directional</li>
<li>Bi-directional</li>
<li>Multi-directional</li>
<li>None of these<br />
Question:161<br />
You can ---------to a network using sockets.</li>
<li>Read</li>
<li>Write</li>
<li>Read/Write</li>
<li>None of these</li>
</ol>
<p dir="auto">Question:162<br />
A serializable class must implement the method(s)…</p>
<ol>
<li>readObject and writeObject</li>
<li>Either readObject or writeObject, or both, depending upon the desired behavior</li>
<li>No need to implement any method:</li>
<li>None of the given option<br />
Question:163<br />
Aside from the Scanner class, which of the following class/es can be used for text file<br />
file input</li>
<li>ObjectInputStream</li>
<li>BufferedReader</li>
<li>StringTokenizer</li>
<li>None of these<br />
Question:164<br />
In which of the following application we do not need to maintain sessions</li>
<li>Cause registering web application</li>
<li>Web based shopping carts</li>
<li>Web reputation systems</li>
<li>Windows shopping systems</li>
</ol>
]]></description><link>https://community.secnto.com//topic/1497/cs506-mcq-s-final-term-paper</link><generator>RSS for Node</generator><lastBuildDate>Mon, 08 Jun 2026 20:44:47 GMT</lastBuildDate><atom:link href="https://community.secnto.com//topic/1497.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 07 Feb 2020 14:52:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CS506 MCQ&#x27;s Final Term Paper on Sun, 25 Aug 2024 08:23:51 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zareen" aria-label="Profile: zareen">@<bdi>zareen</bdi></a> said in <a href="/post/3932">CS506 MCQ's Final Term Paper</a>:</p>
<blockquote>
<p dir="auto">Which of the following is/are not correct about Thread(s)?<br />
Select correct option:<br />
Light weight<br />
Heavy weight<br />
Share same memory<br />
Light weight and share same memory</p>
</blockquote>
<p dir="auto">The correct option is:</p>
<p dir="auto"><strong>Heavy weight</strong></p>
<p dir="auto">Threads are generally considered to be <strong>lightweight</strong> compared to processes because they share the same memory space (i.e., address space) and resources within a process. Threads within the same process can efficiently share data and communicate with each other due to this shared memory.</p>
<p dir="auto">Therefore, threads are not heavy weight; they are lightweight and share the same memory.</p>
]]></description><link>https://community.secnto.com//post/7539</link><guid isPermaLink="true">https://community.secnto.com//post/7539</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Sun, 25 Aug 2024 08:23:51 GMT</pubDate></item><item><title><![CDATA[Reply to CS506 MCQ&#x27;s Final Term Paper on Sun, 25 Aug 2024 08:21:28 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zareen" aria-label="Profile: zareen">@<bdi>zareen</bdi></a> said in <a href="/post/3932">CS506 MCQ's Final Term Paper</a>:</p>
<blockquote>
<p dir="auto">Which of the following object contains information specific to a servlet?<br />
Select correct option:<br />
ServletContext<br />
ServletConfig<br />
ServletRequest<br />
ServletResponse</p>
</blockquote>
<p dir="auto">The object that contains information specific to a servlet is <code>ServletConfig</code>.</p>
<p dir="auto">Here’s a brief explanation of each option:</p>
<ul>
<li>
<p dir="auto"><strong>ServletContext</strong>: This object provides information about the servlet’s environment and context, such as attributes and parameters that are common to all servlets in the application. It does not contain servlet-specific information.</p>
</li>
<li>
<p dir="auto"><strong>ServletConfig</strong>: This object contains information specific to a servlet, including initialization parameters and references to the <code>ServletContext</code>. It is created by the servlet container and is unique to each servlet.</p>
</li>
<li>
<p dir="auto"><strong>ServletRequest</strong>: This object represents the client’s request and contains information such as request parameters, attributes, and the HTTP method. It is used to handle the request but does not store servlet-specific information.</p>
</li>
<li>
<p dir="auto"><strong>ServletResponse</strong>: This object represents the response that will be sent to the client and is used to provide data back to the client. It is concerned with the output of the servlet, not its configuration.</p>
</li>
</ul>
<p dir="auto">So, the correct option is <strong>ServletConfig</strong>.</p>
]]></description><link>https://community.secnto.com//post/7537</link><guid isPermaLink="true">https://community.secnto.com//post/7537</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Sun, 25 Aug 2024 08:21:28 GMT</pubDate></item><item><title><![CDATA[Reply to CS506 MCQ&#x27;s Final Term Paper on Sun, 25 Aug 2024 08:01:14 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/zareen" aria-label="Profile: zareen">@<bdi>zareen</bdi></a> said in <a href="/post/3932">CS506 MCQ's Final Term Paper</a>:</p>
<blockquote>
<p dir="auto">Which of the following is NOT a web technoloy of Java?</p>
</blockquote>
<p dir="auto">To determine which of the following is <strong>not</strong> a web technology related to Java, I would need a list of options. However, here are some common Java web technologies and tools, which might help:</p>
<h3>Common Java Web Technologies:</h3>
<ol>
<li><strong>Servlets</strong>: A technology for creating web applications in Java.</li>
<li><strong>JSP (JavaServer Pages)</strong>: A technology that allows you to embed Java code in HTML pages.</li>
<li><strong>JSF (JavaServer Faces)</strong>: A Java web framework for building user interfaces.</li>
<li><strong>Spring MVC</strong>: Part of the Spring Framework, used to create web applications.</li>
<li><strong>Hibernate</strong>: An ORM (Object-Relational Mapping) framework, but not strictly a web technology.</li>
<li><strong>JAX-RS (Java API for RESTful Web Services)</strong>: A Java API for building RESTful web services.</li>
<li><strong>Struts</strong>: An open-source web application framework used to develop Java EE web applications.</li>
<li><strong>GWT (Google Web Toolkit)</strong>: A development toolkit to build and optimize complex browser-based applications.</li>
<li><strong>Thymeleaf</strong>: A server-side Java template engine for web and standalone environments.</li>
</ol>
<h3>Non-Java Web Technologies:</h3>
<p dir="auto">Here are some technologies that are <strong>not</strong> specific to Java:</p>
<ul>
<li><strong>PHP</strong>: A server-side scripting language used for web development.</li>
<li><strong>Ruby on Rails</strong>: A web application framework written in Ruby.</li>
<li><strong><a href="http://ASP.NET" target="_blank" rel="noopener noreferrer nofollow ugc">ASP.NET</a></strong>: A web framework developed by Microsoft for building dynamic web applications.</li>
<li><strong>Django</strong>: A high-level Python web framework.</li>
<li><strong>JavaScript</strong>: A programming language primarily used for front-end web development.</li>
</ul>
<p dir="auto">If you have specific options, please provide them, and I can identify which is not a Java web technology.</p>
]]></description><link>https://community.secnto.com//post/7525</link><guid isPermaLink="true">https://community.secnto.com//post/7525</guid><dc:creator><![CDATA[cyberian]]></dc:creator><pubDate>Sun, 25 Aug 2024 08:01:14 GMT</pubDate></item></channel></rss>