Java certification Quiz
J2EE Quiz - 1

Total Questions : 21

« 1 2 3 »

1. Session Tracking with servlets is achieved by:

1. Cookies
2. URL rewriting
3. HttpSession
4. Hidden form fields
a) 1 and 3
b) 1,2 and 3
c) 1,2 and 4
d) All of them.

Wrong!Try again..
Wrong Again! Try one more chance..
Wrong! The correct answer is d) All of them.
Correct!
All of them.

2. If the following JSP is accessed what is output on browser?

<html>
 <body>
  <%int a=10;%>
  <%int b=20;%>
  <%! int a=30;%>
  <%! int b=80;%>
  <% out.println(a+b);%>
 </body>
</html>
a) 110
b) 30
c) Translation error
d) Compilation error

Wrong! Try again..
Wrong Again! Try one more chance..
Wrong! The correct answer is b)30 .
<%! xx %> is global variable inserted into servlet class and <% xx %> is local, inserted into service() method.
Correct!
<%! xx %> is global variable inserted into servlet class and <% xx %> is local, inserted into service() method.

3. The type of Enterprise Java Bean which stores persistent data is

1. Stateful Session Bean
2. Stateless Session Bean
3. Entity Bean
4. Message Driven Bean
a) 3 and 4
b) 3
c) 1 and 3
d) 1, 3 and 4

Wrong! Try again.
Wrong Again! Try one more chance..
Wrong!
The correct answer is b) 3
Correct!
3

4. Which of the following is NOT true with client-server communication?

1. GET method sends form information as part of URL
2. POST data is submitted inside body of HTTP request
3. POST is fast, quick and easy
4. POST data is not visible in URL.
a) 3 and 4
b) 2
c) 4
d) 3
Wrong! Try again.
Wrong Again! Try one more chance..
Wrong! The correct answer is d) 3
Correct!
3.

5. Which of the following are NOT JSP implicit objects?

 1. request
 2. response
 3. session
 4. application
 5. page
 6. exception
a) None
b) 4 and 6
c) 5 and 6
d) 3 and 5
Wrong! Try again.
Wrong Again! Try one more chance.
Wrong!
The correct answer is a) None : All are JSP implicit objects.
Correct!
None : All are JSP implicit objects.

6. Which is NOT true with respect to networking ?

1. TCP/IP is a two-way communication Protocol
2. UDP is a one-way communication Protocol
3. TCP/IP is reliable
4. UDP is not reliable
5. UDP is used for bulk data
6. TCP/IP is connection oriented
a) A and C
b) A and B
c) C and F
d) None
Wrong! Try again.
Wrong Again! Try one more chance..
Wrong!
The correct answer is d) None : All are true
Correct! None : All are true

7. In an application that transfers funds from one account to another, which database property ensures that the total value of funds in both the accounts is the same at the start and end of each transaction?

a) Atomicity
b) Isolation
c) Durability
d) Consistency
Wrong! Try again.
Wrong Again! Try one more chance..
Wrong!
The correct answer is d) Consistency
Correct! Consistency
Core Java Quiz