You are on page 1of 4

'1) java.lang.ArrayList must be used in many classes ........................... ...Which Key word will u use ???

a)import (answer) b)Get c)Use d)Link 2) Which driver allows u to access the data bases directly??? a)JDBC-ODBC driver b)Native API (answer) c)Net Protocol d)Native Protocol 3)Which query will u use to extract data from database.............? a)Extract b)Retrieve c)select (answer) d)collect 4)Which statement will u use to select details f the employee whose job-title is 'manager' n name starts with 's'? a) b) c) d) 5)public class abc { public static void main(String args[]) { byte b=0; b+=1; System.out.println(b); } } (answer)b=1 6)Wat is the Output of this code public class abc { public int getNum() { count=0; count++; return count; } public static void main(String args[]) { System.out.println(getNum()); } } a)Compiler error (answer) b) 0 c) 1 d) 2 7) After compiling a jsp file the entire code tranfers into a________________ me

thod of servlet a)service() b)_jsp service() (answer) c)init() d)doGet 8)'drop' in oracle deletes all rows as well as the structure of the table a)true (answer) b) false 9)Life Cycle of servlet??? a)init() b)destroy() c)service() d) a,b,c (answer) 10) Which object is used to call the getSesson method a)HttpServlet b)HttpServletRequest (answer) c)HttpServletResponse d)SessionContext 11) Round(3487,-2) a) 35 (answer) b) 87 c) 3500 d) 3400 12) Which key word is used to retrieve the information about the parameters??? a)param b)Param-info c)param-description d)description e)param-value********* 13) Wat is the output of the following code???? public class abc { public static void main(String args[]) { Integer i=new Integer(10); Long l=new Long(10); System.out.println(i+l); } } a)Runtime error b)Compile time error (answer) c)20********** d)10 14)What command would u use to compile the following code which is in Hello.java class HelloWorld { public static void main(String args[]) { . . .

. . . } } a)javac b)javac c)javac d)javac Hello.java (answer) HelloWorld.java Hello HelloWorld

15) What is the output of the following code when it is interpreted??? java abc tcs ilp is best public class abc { public static void main(String args[]) { System.out.println(args[0]+" "+args[args.length-1]); } } a)tcs best (answer) b)ilp best c)tcs is d)ilp e)Array Index out of bounds 16)A question on Inheritance along with Interface 17)Which driver supports access to multiple odbc drivers a)Type 1********* b)Type 2 c)Type 3 d)Type 4 18) Some question on tag libraries 19) Syntax for include directive............. 20) Correct syntax for declaring variables in PL/SQL a)ename varchar; b)ename text(10) c)ename vrchar 10 d)ename varchar2(10) (answer) 21) Scriptlet code is given and asked to guess the output 22)Which statement is true about synchronised methods??? a)thread safe..............secure (answer) b)not thread safe c)secure c)No such methods 23) jdbc drivers , make use of which packages...................??? a)java.sql.* and javax.sql.*; (answer) b)java.rdbc.*; c)java.jdbcdriver.*; d)all of the above

24) What is the output of the following code?? package abc; public class A { protected int k=0; } package pqr; import abc.A; class B extends A { public static void main(String args[]) { B b=new B(); Sysrtem.out.println(b.k); } } a)Compile time error while printing k b)Compile time error for declaring k as protected c)Compile time error while importing package d)Compile time error while accessing k by the reference variable (answer)

You might also like