Anda di halaman 1dari 22

1.

) What will be the output for the below code


dbms_output.put_line('new'||null||null||'delhi');
a. new
b. newdelhi~~~~~~~~
c. new
delhi
d. null
---B)
2.)Which of the below keyword is not used while implementing exception
choose multiple options:
a. try
b. catch
c. finally
d. exception
e. access~~~~~
ans--e)
ANS: Implementaion of Exception
try{
}catch(Exception e_obj){
}
finally{
}

3.) Is (++) same in prefix postfix(T/F)


ans--f
ANS:
(++) is used for both prefix & postfix
PREFIX: value of variable is incremented before calculation of expressio
n
i=1;
a=++i+5;
after execution: a=7

&

i=2;

POSTFIX: value of variable is incremented after calculation of expressio


n
i=1;
a=i+++5;
after execution: a=6

&

i=2;

4.) xyz varray(10);


xyz={1,2,3,4,5,6,7};
xyz.trim(1);
print the varray what will be the output
a. 1,2,3,4,5,6

b. 2,3,4,5,6,7
c. compilation error
d. 1,2,3,4,5,6,7
---a)
ANS:
declare
type v_xyz IS varray(10) of INTEGER;
xyz v_xyz;
c Integer ;
begin
xyz:= v_xyz(1,2,3,4,5,6,7);
xyz.trim(1); -- Remove the last 1 element, leaving none.
c:=xyz.count;
for i in 1 .. c LOOP
dbms_output.put_line(xyz(i));
END LOOP;
end;
/
output:-

1
2
3
4
5
6
Statement processed.
0.01 seconds

5.) Which of the following are checked exceptions?


a. ioexception
b. arrayoutofboundexception
c. filenotfound
d. nullpointerexception
e. -------a)&c)
optios was like 1&2 2&4 2&3

Unchecked Exception
Checked Exception
ArrayIndexOutOfBoundsException
ClassCastException
IllegalArgumentException
IllegalStateException
NullPointerException
NumberFormatException

AssertionError
ExceptionInInitializerError
StackOverflowError
NoClassDefFoundError
IOException
FileNotFoundException
ParseException
ClassNotFoundException
CloneNotSupportedException
InstantiationException
InterruptedException
NoSuchMethodException
NoSuchFieldException

6.) which exception is not mandatory to be handled


a. ioexception
b. arrayoutofboundexception
c. filenotfound
d. nullpointerexception
e. classnotfound
---b)&d)
#1) Checked Exception: Checked exception is handled during compile time and it g
ives compilation error if it is not caught and handled during compile time.
Example: FileNotFoundException, IOException etc.
#2) Unchecked Exception: In case of unchecked exception, compiler does not manda
te to handle. Compiler ignores during compile time.
Example: ArrayIndexoutOfBoundException

7.) Select the correct syntax


1.select abs("80")"absolute" FROM dual;
2.select abs('80')absolute FROM dual;
3.select abs(80),absolute FROM dual;
4.select abs('80')"absolute" FROM dual;
--select abs(80)absolute FROM dual;
or
select abs(80)as absolute FROM dual;
8.) syntax for PRAGMA exception
full syntax with declare begin and end
--- DECLARE
user_define_exception_name EXCEPTION;
PRAGMA EXCEPTION_INIT(user_define_exception_name,-error_number);
BEGIN
statement(s);
IF condition THEN
RAISE user_define_exception_name;
END IF;
EXCEPTION
WHEN user_define_exception_name THEN
User defined statement (action) will be taken;
END;

9.) declare
type city is table of varchar2(20) index by pls_integer;
v1 city;
begin
v1(1):='Bangalore';
v1(6):='Mumbai';
v1(2):='Delhi';
dbms_output.put_line(v1.count); ~~~3
dbms_output.put_line(v1(2)); ~~~~~delhi
dbms_output.put_line(v1.next(6)); ~~~~~~NULL
end;
What will be the output for the above code?
a. 3 delhi delhi
b. 3 delhi mumbai
c. 3 delhi
d. 3 delhi bangalore
---C)
@NS:
~~~~~~~~NEXT(n) returns the subscript that succeeds index n.
~~~~~~~if n has no successor, NEXT(n) returns NULL.
10.) Can we retrieve table after performing purge operation(T/F)
---F)
@NS:
Once Table dropped, tables can be "undropped":
drop table t;
Table dropped.
desc t;
ERROR:
ORA-04043: object t does not exist
> select count(*) from t;
select count(*) from t
*
ERROR at line 1:
ORA-00942: table or view does not exist
> flashback table t to before drop;
Flashback complete.
purge is useful in 10g when you want to "really truly drop a table"
drop table t purge;

11.) Functionality implementation between classes is common(T/F)


12.) j=10;
sysout(j++);
a. 10 ---b. 11
c. compilation error
d. none
---a)
POSTFIX: value of variable is incremented after calculation of expressio
n
j=10;
a=j+++5;
after execution: a=15

&

j=11;

13.) What are abstract classes?


1. reader
2. inputstream
3. opstream
4. inputstream reader
---1) & 2)& 3)

14.)

String x = "abc";
Stringbuffer sb = new Stringbuffer(x);
sysout(sb==x)~~~ Incompatible operands type
;
(True/false)

ANS:
here Objects are different
exception message:
"Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Incompatible operand types StringBuffer and String
Syntax error, insert ";" to complete Statement "
15.) trim(0 from "0003443000");
---select trim('0' from '000003443000') from dual; ----> 3443
ANS:
TRIM enables you to trim leading or trailing characters (or both) from a charact
er string. If trim_character or trim_source is a character literal, then you mus
t enclose it in single quotes.
If you specify LEADING, then Oracle Database removes any leading characters equa
l to trim_character.
If you specify TRAILING, then Oracle removes any trailing characters equal to tr
im_character.

If you specify BOTH or none of the three, then Oracle removes leading and traili
ng characters equal to trim_character.
If you do not specify trim_character, then the default value is a blank space.
~~~~~~~~~~If you specify only trim_source, then Oracle removes leading and trail
ing blank spaces.~~~~~~~~~~
The function returns a value with datatype VARCHAR2. The maximum length of the v
alue is the length of trim_source.
If either trim_source or trim_character is null, then the TRIM function returns
null.

16.) java primitive long size(bytes)


a. 8 byts~~~~~~~~
b. 64 bytes
c. depend upon compiler
---A)

17.) Incorrect about generic and parameter type


a. type safety(true)
b. generic & parameter down cast
c.-----d.-----18.) finalize will run before garbage
finalize will run atleast once
(true or false)
---True & False
ANS:
The finalize method is called when an object is about to get garbage collected.
That can be at any time after it has become eligible for garbage collection.
Note that it's entirely possible that an object never gets garbage collected (an
d thus finalize is never called). This can happen when the object never becomes
eligible for gc (because it's reachable through the entire lifetime of the JVM)
or when no garbage collection actually runs between the time the object become e
ligible and the time the JVM stops running (this often occurs with simple test p
rograms).
There are ways to tell the JVM to run finalize on objects that it wasn't called
on yet, but using them isn't a good idea either (the guarantees of that method a
ren't very strong either).
If you rely on finalize for the correct operation of your application, then you'
re doing something wrong. finalize should only be used for cleanup of (usually n
on-Java) resources. And that's exactly because the JVM doesn't guarantee that fi
nalize is ever called on any object.

19.) Cursor using basic loop fetch records from table. How to fetch the same rec
ords
using for loop?
ANS:
The nice thing about the cursor FOR loop is that Oracle Database opens the curso
r, declares a record by using %ROWTYPE against the cursor, fetches each row into
a record, and then closes the loop when all the rows have been fetched (or the
loop terminates for any other reason).

20.) public void main(String args[])


{
Long i=10; ~~~Type mismatch: cannot convert int to Long
syso(i);
}
ANS: Long i=10L;is correct way
---compilation error

21.)
se

For all DML statements one must contain exception handling (T/F)?~~~Fal

22.) Execute immediate will immediately run the dynamic pl/sql block/function(T
/F)?
~~~~T)
ANS:
The EXECUTE IMMEDIATE statement prepares (parses) and immediately executes a dyn
amic SQL statement or an anonymous PL/SQL block. The main argument to EXECUTE IM
MEDIATE is the string containing the SQL statement to execute. You can build up
the string using concatenation, or use a predefined string.
The following PL/SQL block contains several examples of dynamic SQL:
DECLARE
sql_stmt
VARCHAR2(200);
plsql_block VARCHAR2(500);
emp_id
NUMBER(4) := 7566;
salary
NUMBER(7,2);
dept_id
NUMBER(2) := 50;
dept_name VARCHAR2(14) := 'PERSONNEL';
location
VARCHAR2(13) := 'DALLAS';
emp_rec
emp%ROWTYPE;
BEGIN
EXECUTE IMMEDIATE 'CREATE TABLE bonus (id NUMBER, amt NUMBER)';
sql_stmt := 'INSERT INTO dept VALUES (:1, :2, :3)';
EXECUTE IMMEDIATE sql_stmt USING dept_id, dept_name, location;
sql_stmt := 'SELECT * FROM emp WHERE empno = :id';
EXECUTE IMMEDIATE sql_stmt INTO emp_rec USING emp_id;
plsql_block := 'BEGIN emp_pkg.raise_salary(:id, :amt); END;';

EXECUTE IMMEDIATE plsql_block USING 7788, 500;


sql_stmt := 'UPDATE emp SET sal = 2000 WHERE empno = :1
RETURNING sal INTO :2';
EXECUTE IMMEDIATE sql_stmt USING emp_id RETURNING INTO salary;
EXECUTE IMMEDIATE 'DELETE FROM dept WHERE deptno = :num'
USING dept_id;
EXECUTE IMMEDIATE 'ALTER SESSION SET SQL_TRACE TRUE';
END;

23.) fuction will return only one value or block of values?


--- Only 1 value
ANS:
Function can return only One value at a time whether it is VARCHAR2, NUMBER ,DA
TE , PL/SQL table or refcursor .
Anyway , in your case , it is possible by any of the following methods.
1. Concatenate return_value1 and return_value2 and return as a string (delimited
by some special character) and process the string later.
2. Convert the function to procedure and return result through OUT parameters .(
though it is possible to do use OUT paramete in function)
3. Pass Ref cursor or table type instance as return type
4. use Table functions .
24.) procedure with one out parameter is better than fuction with return stateme
nt(T/F)?
---F)
ANS:
1. Function is mainly used in the case where it must return a value. Where as a
procedure may or may not return a value or may return more than one value using
the OUT parameter.
2. Function can be called from SQL statements where as procedure can not be call
ed from the sql statements
3. Functions are normally used for computations where as procedures are normally
used for executing business logic.
4. You can have DML (insert,update, delete) statements in a function. But, you c
annot call such a function in a SQL query.
5. Function returns 1 value only. Procedure can return multiple values (max 1024
).
6.Stored Procedure: supports deferred name resolution. Example while writing a s
tored procedure that uses table named tabl1 and tabl2 etc..but actually not exis
ts in database is allowed only in during creation but runtime throws error Funct
ion wont support deferred name resolution.

7.Stored procedure returns always integer value by default zero. where as functi
on return type could be scalar or table or table values
8. Stored procedure is precompiled execution plan where as functions are not.~~~
~~~~~~~~
9.A procedure may modify an object where a function can only return a value The
RETURN statement immediately completes the execution of a subprogram and returns
control to the caller.

25.) wait(),notify(),notifyall() in synchronised context(t/f)


or
wait(), notify(), notifyAll() must be called inside a synchronized metho
d/block(T/F)
~~~~T)
ANS:
The wait(), notify(), and notifyAll() methods should be called for an object onl
y when the current thread has already locked the object's lock. This point somet
imes goes unnoticed because programmers are used to calling these methods from w
ithin synchronized methods or blocks. Otherwise, you will get "java.lang.Illegal
MonitorStateException: current thread not owner" at runtime.

26.) Interface have only behaviour and functionality but not implementation(t/f)
---T)

27.) jdbc and odbc drivers are used to -------a. jdbc and odbc drivers
b. jdbc driver
c. odbc driver
d. none
---A)
ANS:
When Java first came out, this was a useful driver because most databases only s
upported ODBC access but now this type of driver is recommended only for experim
ental use or when no other alternative is available.
ODBC is a standard Microsoft Windows interface that enables communication between
database management systems and applications typically written in C or C++.
JDBC is a standard interface that enables communication between applications bas
ed on Oracle Java and database management systems.
The JDBC/ODBC bridge is a Java library that allows Java applications to access t
he ODBC interface.
The JDBC-ODBC Bridge is a JDBC driver which implements JDBC operations by transl
ating them into ODBC operations. To ODBC it appears as a normal application prog
ram. The Bridge implements JDBC for any database for which an ODBC driver is ava

ilable. The Bridge is implemented as the sun.jdbc.odbc Java package and contains
a native library used to access ODBC. The Bridge is a joint development of Inte
rsolv and JavaSoft.

28.) method declared in parent class or protected, what will be the access speci
fier for the method in
child class
1. public & protected
2. protected and default
3. private
4. none
----A)
ANS:
It's a fundamental principle in OOP: the child class is a fully-fledged instance
of the parent class, and must therefore present at least the same interface as
the parent class.
The access modifier of an overriding or hiding method must provide at least as m
uch access as the overridden or hidden method, or a compile-time error occurs. I
n more detail:
If the overridden or hidden method is public, then the overriding or hiding meth
od must be public; otherwise, a compile-time error occurs.
If the overridden or hidden method is protected, then the overriding or hiding m
ethod must be protected or public; otherwise, a compile-time error occurs.
If the overridden or hidden method has default (package) access, then the overri
ding or hiding method must not be private; otherwise, a compile-time error occur
s.
Note that a private method cannot be hidden or overridden in the technical sense
of those terms. This means that a subclass can declare a method with the same s
ignature as a private method in one of its superclasses, and there is no require
ment that the return type or throws clause of such a method bear any relationshi
p to those of the private method in the superclass.
29.) a.joins permanently joins two tables
b.inner joins are also known as equi joins
a. a & b are true
b. a & b are false
c. a true b false
d. a false b true
~~~~D)

30.) serialixation is jvm dependent(T/F)


~~~T)
31.) serialization output in byte forms(T/F)
~~~~T)
ANS 30 & 31:

Serialization is the translation of your Java object s values/states to bytes to s


end it over network or save it.On other hand,Deserialization is conversion of by
te code to corresponding java objects.
Good thing about Serialization is entire process is JVM independent, meaning an
object can be serialized on one platform and deserialized on an entirely differe
nt platform.\

32.) syntax for creating constant in plsql


Constant_name CONSTANT Datatype := Value;
33.) inputstream deserializes the previous(from dumps)(T/F)
---T)
ANS:
An ObjectInputStream deserializes primitive data and objects previously written
using an ObjectOutputStream.
ObjectInputStream is used to recover those objects previously serialized.
Other uses include passing objects between hosts using a socket stream or for ma
rshaling and unmarshaling arguments and parameters in a remote communication sys
tem.
34.) Which of the following api is used to get the input as character and store
output as character
a. readwrite
b. ipstream/opstream
----A)
Reader: Reader class is used by a Java Program to read character data from desti
nation.
Writer: Writer class is used by a Java Program to write character data to destin
ation.

35.)Advantages of collection API


a. faster software
b. programming effort reduces
c. no need to
d. interporability
--ANS:
The primary advantages of a collections framework are that it:
Reduces programming effort by providing useful data structures and algorithms so
you don't have to write them yourself.
Increases performance by providing high-performance implementations of useful da
ta structures and algorithms. Because the various implementations of each interf
ace are interchangeable, programs can be easily tuned by switching implementatio

ns.
Provides interoperability between unrelated APIs by establishing a common langua
ge to pass collections back and forth.
Reduces the effort required to learn APIs by eliminating the need to learn multi
ple ad hoc collection APIs.
Reduces the effort required to design and implement APIs by eliminating the need
to produce ad hoc collections APIs.
Fosters software reuse by providing a standard interface for collections and alg
orithms to manipulate them.

36.) which is true about constructor?


1.it can be overridden
2.it can be overloaded ~~~~~~~~~
3.it is similar to method and we have to call it explicitly
4.it has a return typesyntax for how to create a ref cursor
---2)

37.) constructor is invoked when every time object is created(T/F)


---T)
38.) datainputstream is not neccesary to be safe in synchronised threads(T/F)
ANS:
It will not cause a data race. If you are calling the same method on different t
hreads, each thread has a different copy of the method on its own stack. Therefo
re, local variables inside the method exist on each thread's stack with differen
t copies.
So, your only problem can appear if the DataInputStream which is an external par
ameter is shared or not. If not, then you have no problems. The fact that the me
thod is static does not influence in any way what I've said above.

39.) String s1 = new String("abc");


String s2 = new String("abc");
sysout(s1.equals(s2));
sysout(s1.equals(s1));
--- F) & T)
ANS:
public class Dummy {
/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
String s1 = new String("abc");
String s2 = new String("abc");
System.out.println(s1.equals(s2));
System.out.println(s1.equals(s1));
}

}
/**
* OUTPUT
*/
true
true

40.) syntax for finding absolute value


@NS:
select abs(80)absolute FROM dual;
or
select abs(80)as absolute FROM dual;

41.) DECLARE a number(2),b varchar2(10),c number(10);


a.
b.
c.
d.

simplerecord
customer record
table record
cursor record

42.) Exception(declared as null in default try to pass some other value)


a. self is null
b. value error
c. storage null

43.) threadsafe--->>> vector & hashtable


@NS:
Vector and Hashtable are synchronized implementations of their respective data s
tructures. Java has used mutex(mutual exclusion) semaphore for 'synchronization'
, therefore only one thread can own a Vector or HashTable at a time. Hence, Vect
or and Hashtable are thread-safe.
44.) super class of exception - throwable

45.) sub class of exception


1.runtimeexception
2. error
3.-4.--

--- 1)

46.) datainputstream is a asubclass filterinputstream(T/F)


---T)
47.) String a= "true";
boolean b = Boolean.parseBoolean(a);
System.out.println(a==b);~~~ Incompatible Type Object Mismatch
a. true
b. false
c. zero
--- Error
48.) digicam question
a. no error
b. compilation error
c. digicam can change
---b)
49.) String s = new String();
is it right
---T)
a. true
b. false
50.) List<Integer> list = new Arraylist<Integer>();
is it right/validated
a. true
b. false
~~~A)True
51.) SQl functions can have IN & INOUT parameters(T/F)
---F)
52.) PLSQL functions can return more than one value(T/F)
---F)
53.)

TYPE ls_list is table of number


list ls_list
BEGIN
list:=ls_list();
list.extend;
list(1):=78;
dbms(list(1));
end;

what will be the output of the above code


a. 78

b. compilation error
c. no error
d. -ans---A
54.) We can change the value of "IN" parameter in PLSQL(T/F)
---f)
55.) class while{
public static void main(String[] args)
{
int a = 'A';
int i=a+32;
while(a<='Z')
{
a++;
}
s.o.p(i);
s.o.p(a);
}
a. 97,91
b. A,Z
c. a,z
d, 91,97
ans--- A
55.) Which API are used for reading and writing characters from a source?
a. reader and writer APIS
b. inputstream and output APIs
c. NAtive APIs
---A)
56.) full outer join is used when
a. if there are matched columns/records from both tables
b. if there are matched column/record from only one table
c. if there are unmatched columns/records from both tables
4. when both tables are having null values
---C)

57.) select * from suppliers where supplier_name like '!%'escape'!'


a. it will display all the records
b. it will display records starting with !
c. it will display records starting with %
d. query will generate error
---C)
@NS:
It is important to understand how to "Escape Characters" when pattern matching.
This SQL LIKE condition example identifies the ! character as an escape characte
r. This statement will return all suppliers whose name is %.

58.) select * from (select rank(), (over order by desc)as marks FROM supplier
order by supplier_name----line1
)where rank<3;
a. query will generate error at line 1
b. it will display the first(highest 2) records
c. it will display the last(lowest 2) records
d. no error
---A)
59.) choosing the two correct syntaxes for left outer join
@NS:
SELECT columns
FROM table1
LEFT [OUTER] JOIN table2
ON table1.column = table2.column;
OR
SELECT columns
FROM table1, table2
WHERE table1 = table2(+);

60.) Which of the following is correct about stored procedure


1. network trafiic conservation
2. improved security
3. execution retention & reuse
4. all the listed options
~~~~4)
@NS:
You can store PL/SQL procedures in the database, and call these stored procedure
s from Oracle applications. Storing a procedure in the database offers many adva
ntages. Only one copy of the procedure needs to be maintained, it is in the data
base, and it can be accessed by many different applications. This considerably r
educes maintenance requirements for large applications. A stored procedure is no
t recompiled each time it is called.

61.) develop a web application so that user can interact with multiple user inte
rfaces.
In web applications HTML,XML,WML is used. Which is the best design pattern for t
his concept
a. DAO
b. Bridge pattern
c. Model view controller
d. chain of responsibility
---C)

62.) Exception can move across modules with throw & throws keywords(T/F)
---T)
63.) Take out the wrong one
a. import
b. extends
c. implements
d. throwed
---D)
64.) Declare
TYPE numlist is TABLE of NUMBER(10);
n numlist;
BEGIN
n:=numlist(10,8,7,6,5,4,3,2);
dbms(n(1));
END;
a. 10
b. 8
c. error
d. none
---A)
65.) DECLARE
TYPE l_num_list IS TABLE of number;
list l_num_list;
begin
list.extend;
list(1):=1;
dbms(list(1));
END;
a. referenced to uninitialized collection
b. no error
c. 1
---A)
66.) Parameterised queries are also known as ____________?
---Prepared statment.
67.) In interface how we will declare variables by using
a. public
b. static
c. final
d. native
choose multiple options
---A) & B)&C)

68.) super class of exception is threowable!!!!

69.) java.util.date date = new java.util.date();


what does above code denotes
a. it will print current date
b. it will create an object to print current date~~~~~~~
c.----d.-------B)

70). What are the methods in BufferedOutputStream class in java?


a. void flush() :Flushes this buffered output stream.
b. void write(byte[] b, int off, int len) :Writes
len bytes from the specified byte array starting at offset off to this buffered
output stream.
c. void write(int b) :Writes the specified byte to this buffered output stream.
---A) &B) &C)
@NS:
Methods
Modifier and Type
Method and Description
void
flush()
Flushes this buffered output stream.
void
write(byte[] b, int off, int len)
Writes len bytes from the specified byte array starting at offset off to this bu
ffered output stream.
void
write(int b)
Writes the specified byte to this buffered output stream.
Methods inherited from class java.io.FilterOutputStream
close, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait,
wait, wait

71.) An Application can be "Tightly coupled and loosely cohesed"? true or false
---F)
72.) Can we hava an interface inside class?(T/F)
---T)

73.) Arrange these statements in correct order


1.import
2.package
3.methods
4.class
--- 2 1 4 3.

74.) Syntax for how to create a ref cursor


@NS:
TYPE cursor_type IS REF CURSOR;
75.) JVM will handle memory out of error or not???(T/F)
-- F

76.) jdbc Is contained in which package


choose multiple options
a. java.sql
b. javax.sql
c. ------d. --------- A)& B)
@NS:

77.) Why collections are needed in oracle?


@ANS:
The primary advantages of a collections framework are that it:
Reduces programming effort by providing data structures and algorithms so you do
n't have to write them yourself.
Increases performance by providing high-performance implementations of data stru
ctures and algorithms. Because the various implementations of each interface are
interchangeable, programs can be tuned by switching implementations.
Provides interoperability between unrelated APIs by establishing a common langua
ge to pass collections back and forth.
Reduces the effort required to learn APIs by requiring you to learn multiple ad
hoc collection APIs.
Reduces the effort required to design and implement APIs by not requiring you to
produce ad hoc collections APIs.
Fosters software reuse by providing a standard interface for collections and alg
orithms with which to manipulate them.
78.) Default can be accessed outside of package(yes/no)
---F)
79.) Which executes for only one time
a. do while() loop
b. while
c.--d.-----A)
80.) Indexes increase the query performance by faster retrieval(T/F)
---T)

81.)
public class demo
{
public static void main(String[]args)
{
StringBuffer s1=new StringBuffer("welcome");
StringBuffer s2=new StringBuffer("welcome");
System.out.println(s1.equals(s2));
System.out.println(s1.equals(s1));}
}
options: a. true,false
b.false,true
c.false,false
d.true,true
---B)
82.) wrapper objects of int,char,short can be used by switch case?(T/F)
---T)
83.) a.Any operator : The ANY operator is used to compare a value to any
applicable value in the list according to the condition.
b.All operator: The ALL operator is used to compare a value
to all values in another value set.
a. a and b are true
b. a and b are false
c. a true,b false
d. a false,b true
~~~a)
84.) Following are the two types of data type conversion.(T/F)
1.implicit
2.explicit
---T)

85.) what is type of record of the following:


type rec is Record
Begin
rec.col1=employee.name;
rec.col2=employee.lastname;
}
a. simple record
b. custom record
c. cursor record
d. table record
---B)

86.) Runtime exception is the super class for all the exceptions that can be
thrown during normal operation of JVM.(T/F)
---T)
@NS:
RuntimeException is the superclass of those exceptions that can be thrown during
the normal operation of the Java Virtual Machine.

RuntimeException and its subclasses are unchecked exceptions. Unchecked exceptio


ns do not need to be declared in a method or constructor's throws clause if they
can be thrown by the execution of the method or constructor and propagate outsi
de the method or constructor boundary.
87.) Function of %RowFound keyword
--there is no such %RowFound keyword
@NS:
%FOUND
Returns TRUE if an INSERT, UPDATE, or DELETE statement affected one or more rows
or a SELECT INTO statement returned one or more rows. Otherwise, it returns FAL
SE.
%ROWCOUNT
Returns the number of rows affected by an INSERT, UPDATE, or DELETE statement, o
r returned by a SELECT INTO statement.
88.) When threads are executed with same priorities?

89.) Duplicate values are inserted in set(T/F)


---F)

90.) Will the following line show error


Ans : Queue q = new LinkedList();
~~~

91.) CREATE OR REPLACE TRIGGER trigger_name AS


......
FOR EACH ROW
What type of trigger is it?
@NS:
ROW Type
92.) Syntax of sequence to print 2,4,6,8
@NS:
Create [OR Replace] Sequence seq_name
Start With 2
Increment By 2
MaxValue 8;
93.) Error is the subclass of Throwable-True or False
---T)

94.) An abstract class cannot contain abstract method .-True or false


~~~~~False
@ns:
An abstract class may or may not contain abstract method
95.) A super() call can only be done by constructors and not by any other method
-T/F
---T)

96.) Does StrinTokenizer implement the Enumeration interface? ~~~~~~ True

Anda mungkin juga menyukai