Test
Test
By setting
the
session-
timeout
paramete
By using r in the
the web.xml
Carefully read the question and answer accordingly. invalidate file to 1
Which of the following options can be used by the controller to destroy a session of a web application
() method minute
immediately?
<HTML>
<BODY>
<FORM
ACTION=
http://loca
<HTML> lhost:808
<BODY> 0/servlet/
<FORM myservlet
ACTION= METHOD
http://loca =GET>
lhost:808 <INPUT
0/servlet/ TYPE=S
myservlet UBMIT
METHOD VALUE=S
=GET> UBMIT>
</FORM> </FORM>
Carefully read the question and answer accordingly. </BODY> </BODY>
Which of the following codes will allow the user to load the servlet using form. The form should
</HTML>
first display
</HTML>submit button and w
These
are
responsib
le for
managing
the
lifecycle
of
servlets,
mapping
a URL
(Universal
Resource
Locator)
to a
particular
servlet,
and
These ensuring
are that the
specialize URL
d Web requester
servers, has got
which the
support correct
Carefully read the question and answer accordingly. servlet access
Which of the following is applicable to Servlet Containers? execution rights
to provide
the
configurat
ion
details on
how the
web
server
provides should
security use them
informatio to serve
n of the the
Carefully read the question and answer accordingly. applicatio incoming
Which of the following can be considered as role(s)
Carefully read the question and answer accordingly. of a deployment descriptor in a .war or n.ear modules?
requests
You are developing dynamic web application using JSP. Which attribute of page directive specifies
import thesession
list of classes imported in
Statemen
t A is true
Carefully read the question and answer accordingly. Both and
Statement A:finalize will always run before an object is garbage collected Statemen Statemen
Statement B:finalize method will be called only once by the garbage collector ts A and t B is
which of the following is true? B are true false
Carefully read the question and answer accordingly.
class Background implements Runnable{ It will It will
int i = 0; compile compile
public int run(){ and the and
while (true) { run calling
i++; method start will
System.out.println("i="+i); will print print out
} out the the
return 1; increasin increasin
} g value of g value of
}//End
} class i. i.
} int String
}
System.out.print("finished"); /* Line 24 */
} exception Compilati
}2.error finished on fails
3.compilation error 1&2 1&2&3
Carefully read the question and answer accordingly. ObjectInp StringRea
Which of these class are the member class of java.io package? ut der
Carefully read the question and answer accordingly.
Which of these class are related to input and output stream in terms of functioning? File Writer
Carefully read the question and answer accordingly. JDBC ODBC
The JDBC-ODBC Bridge driver translates the JDBC API to the ODBC API and used with which
drivers
of the drivers
following:
Both Statemen
Carefully read the question and answer accordingly. Statemen t A is True
Consider the following statements: t A and and
Statement A: The PreparedStatement object enables you to execute parameterized queries. Statemen Statemen
Statement B: The SQL query can use the placeholders which are replaced by the INPUT parameters
t B are tat
B runtime.
is
Which of the
Carefully readfollowing optionand
the question is True withaccordingly.
answer respect to the above statements? True. False.
What is the state of the parameters of the PreparedStatement object when the user clicks on
initialized
the Query
started
button?
adds 10 adds 10
seconds minutes
to the to the
Carefully read the question and answer accordingly. current current
What will be the output of the below query? Timestam Timestam
select to_CHAR(sysdate+(10/1400),'HH:MI:SS') from dual; p p
Statemen
t A is true
Carefully read the question and answer accordingly. Both and
Statement A:Listener process scans for connection requests to an Oracle Instance Statemen Statemen
Statement B:Listener process links up a dispatcher process to user process. ts A and t B is
which of the following is true? B are true false
Top 2 Top 2
Carefully read the question and answer accordingly. student student
What will be the output of the below query? record record
select Stud_name from ( with with
select rank() over(order by Marks desc) as rank ,Stud_name from StudentDetails highest lowest
order by Stud_name --LINE 1 marks will marks will
) be be
where rank > 3 displayed displayed
It would
be
It would created
be and
created would
Carefully read the question and answer accordingly. only if a use an
Evaluate the CREATE TABLE statement: unique automatic
CREATE TABLE products index is ally
(product_id NUMBER(6) CONSTRAINT prod_id_pk PRIMARY KEY, manually created
product_name VARCHAR2(15)); created unique
Which statement is true regarding the PROD_ID_PK constraint? first. index.
Carefully read the question and answer accordingly.
Evaluate the following SQL statements that are issued in the given order:
CREATE TABLE emp
(emp_no NUMBER(2) CONSTRAINT emp_emp_no_pk PRIMARY KEY,
enameVARCHAR2(15), It would
salary NUMBER(8,2), It would be
mgr_no NUMBER(2) CONSTRAINT emp_mgr_fk REFERENCES emp); be automatic
ALTER TABLE emp automatic ally
DISABLE CONSTRAINT emp_emp_no_pk CASCADE; ally enabled
ALTER TABLE emp enabled and
ENABLE CONSTRAINT emp_emp_no_pk; and immediat
What would be the status of the foreign key EMP_MGR_FK? deferred. e.
Start an
instance, Mount the
Open the database,
Database Start the
, Mount instance,
Carefully read the question and answer accordingly. the Open the
Which of the following gives the order of Database administrative steps needed to open andatabase
Oracle Database?
database
PURGE
DBA_RE PURGE
Carefully read the question and answer accordingly. CYCLEBI RECYCL
How to drop all tables from recycle bin? N EBIN
select
select empNam
empNam e ,
e, empNo
empNo from emp
from emp where
where empno
empno = exists
( select ( select
Carefully read the question and answer accordingly. deptNo deptNo
John wants to retrieve all the employee details whose Employee Number matches to any from from
of
Anthe Department
outer Number.
join returns all rowsHelp
that john to achieve
satisfy his task and those rows from one table for
the join condition dept)
which nodept)
rows from the other satis
State True or False. TRUE FALSE
A A
package package
specificati body
on can appears
exists without
without a package
Carefully read the question and answer accordingly. package specificati
What are the true aspects of PLSQL? body on
max_day max_day
s_in_year s_in_year
CONSTA CONSTA
NT NT
Carefully read the question and answer accordingly. INTEGER INTEGER
Pick the valid constant declaration in PL/SQL ; := 366;
Carefully read the question and answer accordingly. run time compile-
what is the result when we attempt to change the value
Carefully read the question and answer accordingly. of an IN parameter ? exception time error
The functions can return PL/SQL specific data types such as BOOLEAN, RECORD, or TABLE
TRUE FALSE
The
trigger
fails
because
it needs
The to be a
trigger row level
fires AFTER
Carefully read the question and answer accordingly. successfu UPDATE
You have a row level BEFORE UPDATE trigger on the EMP table. This trigger contains a SELECT
lly. statement
trigger. on the EMP table
Replacing
RAISE_A
PPLICATI
ON_ERR
OR(-
20000,
'no
negative
age
allowed');
to
RAISE_A
PPLICATI
Carefully read the question and answer accordingly. ONS_ER
You are developing a trigger which should ensure that no negative value is inserted in employee
The order
table’s
ROR(-
Age column . you have
create or replace trigger AgeVerify of 20000,
before insert Argument 'no
on employee for each row s passed negative
when(new.EmpAge < 0) to age
begin RAISE_A allowed');
RAISE_APPLICATION_ERROR(-20000, 'no negative age allowed'); PPLICATI will give
end; ON_ERR the
/ OR is desired
Identify error if any in
Return return_variable; the above trigger and give the solution. wrong output
END; TRUE FALSE
Open , Declare ,
Declare , Open ,
Carefully read the question and answer accordingly. Fetch Fetch ,
Consider you are creating a cursor,Choose the correct sequence of steps to work with cursors?
Close Close
Comparis
on
operators
cannot be
used to The value
test of a
cursor cursor
variables variable
for can be
equality, stored in
inequality, a
Carefully read the question and answer accordingly. null, or database
What are the restrictions of REF cursor in PLSQL? not null. column
The
select
statement
provided
within the
cursor
Opening statement
the cursor gets
allocates executed
the when we
Carefully read the question and answer accordingly. memory open the
What occurs when a cursor is opened? first. cursor.
When we
issues a
SELECT..
FOR
UPDATE
clause
the
RDBMS
will
automatic
ally place
a locks
on the all The
the rows records
identified will be
by the available
select for our
Carefully read the question and answer accordingly. statement changes
What is FOR UPDATE clause in Cursors? . only.
Choice3 Choice4 Choice5
By setting
the
setMaxIn
activeInte
rval()
method By using
period to the
60 destroy()
seconds method
HttpSessi
on
session =
request.g
etSession None of
("jsession the listed
id"); options
<HTML>
<BODY>
<FORM
ACTION=
http://loca
lhost:808
0/servlet
<HTML> METHOD
<BODY> =GET>
<INPUT <INPUT
TYPE=S TYPE=S
UBMIT UBMIT
VALUE=S VALUE=S
UBMIT> UBMIT>
</FORM> </FORM>
</BODY> </BODY>
</HTML> </HTML>
These
are also
referred
to as Web
container All of the
s or Web listed
engines. options
to provide
listener
informatio
n to notify
certain has to list
classes down the
when external
some API's
events which are
(like used in
session the web
creation) applicatio
happen n
extends language
Container
doesn't
mind JSP
Translatio syntax
n errors
_jspServi jspInitializ
ce() ation()
Scriptlet
The code gets
doGet() no place
method of in the
generate generate
d servlet d servlet
public,frie final,prote private,ab
nd cted stract
Statemen
t I is
FALSE & Statemen
II is t I & II are
TRUE FASLE
static abstract
Statemen Both
t A is false Statemen
and ts A and
Statemen B are
t B is true false
Compilati
on will
cause an
error
The code because
will cause while
an error cannot
at take a
compile paramete
time. r of true.
Object set1
finally
exception
finally finished
1&3 2 2&3
File String
OutputStr
Reader eam
Both A None of
and B the above
Statemen
t A is Both
False and Statemen
Statemen ts A and
t B is B are
True. False.
paused stopped
adds 10
days to date
the functions
current query cannot be
Timestam contains converted
p error into char
Statemen Both
t A is false Statemen
and ts A and
Statemen B are
t B is true false
If LINE 1
is
removed
Query will than the
generate query will
an error execute
Flashbac
k Query
does not
apply to
code
objects
like
Packages
,
Procedur
es,
Function None of
or the listed
Triggers options
It would
be
created
and
It would remains
be in a
created disabled
and state
would because
use an no index
automatic is
ally specified
created in the
nonuniqu command
e index. .
It would
remain
disabled It would
It would and can remain
remain be disabled
disabled enabled and has
and has only by to be
to be dropping enabled
enabled the manually
manually foreign using the
using the key ALTER
ALTER constraint Constrain
TABLE and re- t
command creating command
. it. .
Cannot
drop
DROP DROP tables
ALL_TAB DBA_RE from
LE_REC CYCLEBI Recycle
YCLEBIN N Bin
select select
select empNam empNam
empNam e, e,
e, empNo empNo
empNo from emp from emp
from emp where where
where empno empno
empno in has Any between (
( select ( select select
deptNo deptNo deptNo
from from from
dept) dept) dept)
Both Both
statement statement
s A and B s A and B
are true. are false.
2&3 1&4 2&4
Employee
name
whose
employee
no is Compiles
101172 is The code and runs
printed if does not without
serverout compile any
put is on at all output
1&3&4 1&2&4 1&3&5
nested
table table
Invalid
Variable None of
declaratio Global the listed
n Variable options
None of
the listed
Varrays option
1234.556 1.234556
7 7
Statemen
Only t1 and
Statemen Statemen
t2 is t2 are
False. False.
Compiles
Compiles Compiles executes
executes executes and prints
and prints and prints 11 12 13
12 Less 12 More More
The
ELSE
clause
does not
works
similarly
to the
ELSE CASE
clause in statement
an IF s can be
statement
% labeled
(percent *
sign) (asterisk)
The
Subprogr
ams that
are
present
inside a
package
cannot
A exists
package separatel
can be y as
invoked database
by itself. objects.
CONSTA
NT
max_day
s_in_year None of
INTEGER the listed
:= 366; option
None of
the listed
no error option
The
trigger
The fails
trigger because
fails you
because cannot
a use the
SELECT minimum
statement and
on the maximum
table functions
being in a
updated BEFORE
is not UPDATE
allowed. trigger.
Replacing Replacing
RAISE_A RAISE_A
PPLICATI PPLICATI
ON_ERR ON_ERR
OR(- OR(-
20000, 20000,
'no 'no
negative negative
age age
allowed'); allowed');
to to
RAISE_A RAISE_A
PPLICATI PPLICATI
ONS_ER ON_ERR
ROR(- OR(-
20000,”n 20000,”n
o o
No negative negative
problem age age
in the allowed”); allowed”);
trigger. It will give will give
gives the the the
desired desired desired
result output output
Declare , Define ,
Open , Fetch , Open ,
Fetch , Open Fetch ,
Close Fetch Close
Two types
of cursors Null
are 1) cannot be
Strongly assigned
typed and to a
2) Weakly cursor
Typed. variable
Open
statement
retrieves
the rows The
from the active set
cursor pointer is
and will set to the
process second
it. row.
The lock
will not be
released
even if
we issue
ROLLBA
CK or
COMMIT None of
. the above