Javashrey
Javashrey
Javashrey
Declare
Var number;
Begin
Var:=null;
For var in 10..100
Loop
Dbms_output.put_line(var);
End loop;
Dbms_output.put_line(var);
End;
4) Class A
{
A()
{
}
}
Class B
{
B()
{
}
}
Class C
{
Public static void main(string[] args)
{
}
}
5) Class test
{
Public static void main(string[] args)
{
int one=1;
int two=2;
system.out.println(“Parvathi”+one+two);
}
}
14) select ename from emp where ename like ‘%s%s%o’ ESCAPE’%’;
15) Try to add the value 3000 to the column which is declared as number(3)
16) Client bean call session bean and connect directly to the database
a. true
b. false
18) If <DOCBASE> is declared in a html page for the appearance of font color etc.,
then <font> attribute overwrite the docbase attribute
a) object
b) method
c) classes
d) state
21) class A
{
A()
{
}
}
Class B extends A
{
B()
{
}
}
Class C
{
Public static void main(string args[])
{
}
What will be the output?
a) compile time error
b) run time error
c) both compile and run time error
d) none of the above
22) If a table has 2 columns with NOT NULL and UNIQUE constraints on it ..what
will be the candidate/ primary key?
a) both are called candidate key
b) one can be a primary key
c) one can be a candidate key
d) none of the above
28) What will be the column heading for the given query?
SELECT sal*10 supply FROM emp;
a) supply
b) Supply
c) SUPPLY
d) sal*10
a) 1+Hello+2
b) One+Hello+two
c) Hello
d) None of the above
35) ____________ class is a wrapper class for the character data type.
a) char
b) character
c) CHAR
d) CHARACTER
40) Write a subquery to select a department where there are no employees in it.
41) Transaction is ____________
a) group of DML statements that can’t be rolled back
b) group of DML statements on a single table
c) group of DML statements on different tables of same schema
d) group of DML statements that are executed (all) or none
45) In a table tag, which option is used to get the space between table border and
cells?
a) cellspacing
b) cellpadding
c) rowspan
d) colspan
Class D
{
Public Static Void Main()
{
C c1=new C();
C.m2();
}
61) If you are changing the code in the procedure,the previous procedure code and the
changed source code will be in ______________
a) USER_DEPENDENCIES
b) USER_PROCEDURE
c) USER_SOURCE
d) USER_SOURCECODE
66) Interface A
{
void display();
}
Class B implements A
{
Public void display(){} //line 1
Private void display(){}//line 2
Protected void display(){}// line 3
}
Which is invalid?
a) line 1
b) line 2
c) line 3
d) All the above
70) In “emp” table, there are null values for some of the columns in all the rows.
Totally there are 14 rows in the table. What will be the output if the given query is
executed?
SELECT 5000 FROM emp;
a) Null is printed only once
b) NULL will be printed 14 times null
c) 5000 will be printed 14 times
d) rror
71) which provides transaction?
a) RMI
b) JNDI
74) Emp Table has 3 columns like Empno,Ename,Passport….All the columns are
unique. Which key can be considered as a primary key?
a) All the three
b) None
c) empno
d) Passport
76) The Main difference between the anonymous block and the procedure
e) We can’t define %rowtype in anonymous block but it is possible
in procedure
f) Anonymous block is not an object but procedure is an object
a) i only
b) ii only
c) both i and ii
d) neither i nor ii
78) Class can be declared as Abstract class by prefixing the keyword __________
Ans: abstract