Java Examples
Java Examples
Hey guys, I know you are worried about your prp assessment. Before going ahead i
would say be relax and study hard. It is not tough like that some people says. Here
I am going to provide you some j2ee prp important mcq question and answer.
questions may be which going to help you in your prp assessment test. Answers of
these questions are in green color. Remember I am not saying that thse questions
will be ask in your prp assessment test but thse question will give you an idea
which type of questions they ask.
a) object -- ANS
b) method
c) classes
d) state
a) True -- ANS
b) False
a) At most 1
c) At least 1
d) At most 127
Declare
Var number;
Begin
Var=null;
Loop
Dbms_output.put_line(var);
End loop;
Dbms_output.put_line(var);
End;
a) float -- ANS
b) char
c) int
d) bool
a) codeclass
b) codename
c) codebase -- ANS
d) none
a) length
b) width -- ANS
c) class
d) breadth
a) <% %>
b) <%0 %>
c) <% ! %>
b) <%0 %>
c) <% ! %>
d) <% = %>
16) Client bean call session bean and connect directly to the database
true
false
a) IS A
b) Extends -- ANS
c) Volatile
d) Instance of
a) final
b) subclass -- ANS
c) instantiated
d) none
class A
A()
{
Class B extends A
B()
Class C
21.) If a table has 2 columns with NOT NULL and UNIQUE constraints on it ..what
will be the candidate/ primary key?
a) select query
b) update query
c) delete query
a) = -- ANS
b) *
c) $
d) #
a) <title>
b) <head>
c) <caption> -- ANS
d) <body>
a) <ii>....</ii>
b) <it>...</it>
c) <i>....</i> -- ANS
d) <italics>....</italics>
a) window
b) Panel -- ANS
c) container
d) object
31) ____________ class is a wrapper class for the character data type.
a) char
b) character -- ANS
c) CHAR
d) CHARACTER
32) Which operator is used as a termination operator in SQL?
a) ; -- ANS
b) @
c) #
d) !
a) String -- ANS
b) object
c) int
d) character
a) j2ee application
b) CGI
d) Netscape
d) hierarchical model
36.) What will be the column heading for the given query?
a) supply
b) Supply
c) SUPPLY
d) sal*10
{
Public Static Void Main(string a[])
int one=1,two=2;
System.Out.Println(one+�Hello�+two);
a) 1+Hello+2
b) One+Hello+two
c) Hello
39) _____________ is the superclass of all classes that are in input streams.
a) output stream
b) input stream
a) Wipro
b) Error
c) No output
d) Null values
a) row
b) column
c) instance
a) Datatype mismatch
c) Error
d) No output
43.) Write a subquery to select a department where there are no employees in it.
a) v.addElement(10);
b) v.add(10);
c) v.addElement(new Integer(10))
d) v.addElement(Integer(10))
46.) Output and input streams are __________ classes
a) static
b) final
c) abstract
d) concrete
d) both a and b
48.) 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
void m1()
};
}
Class C extends A
void m2()
Class D
C c1=new C();
C.m2();
c) logical error
a) Line 1
b) Line 2
d) Line 3
a) result
b) resultset
c) int
d) Boolean -- ANS
a) JNI
b) JVM -- ANS
c) JSM
d) None
a) service(HttpRequest,HttpResponse)
b) service(HttpResponse,HttpRequest)
d) service(ServletResponse,ServletRequest)
a) Java.Servlet
b) Javax.Servlet -- ANS
c) Javax.Servlet.generic
d) Javax.Servlet.http
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
62.) What is the relationship in the network model?
a) 1:1
b) 1:M
c) M:1
d) M:M
a) string of characters
b) string of numbers
d) primitive datatype
int i=10;
void display()
System.Out.Println(i);
int j=10;
void getmethod()
i=20;
System.Out.Println(i);
}
Obj.getmethod();
66) Interface A
void display();
Class B implements A
Which is invalid?
a) line 1
b) line 2
c) line 3
void ABC()
Class B implements A
void ABC()
int i=10;
void display()
System.Out.Println(i);
A obj=new B();
Obj.ABC();
Obj.display();
a) int
b) long
c) short
d) String -- ANS
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?
d) rror
a) RMI -- ANS
b) JNDI
a) EB is the superclass of SB
b) Sb is the superclass of EB
d) None
74) Emp Table has 3 columns like Empno,Ename,Passport�.All the columns are
unique. Which key can be considered as a primary key?
b) None
c) empno
d) Passport
76) The Main difference between the anonymous block and the procedure
ii) Subquery should be declared on the right hand side of the operator
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
a) class
b) methods
c) variable
d) constructor -- ANS
c) Infinite loop
a) Row level
b) Table level
a) data file--ans
b) control file
c) redologfile
d) archive file
a) compilation time
b) run time
c) translation time
d) none
89) What will int=executeQuery() do?
a) compiler error
b) runtime error
d) none
a) line 1 & 2
b) line 3
c) line 2