Reg. No.
I tililt lilt il]t il] ffit lilt lllu ff Iilt l]il flt til BCACACN 602
Sixth Semester B.C,A. Degree Examination, June/July 2O24
(NEP 2A2q eO23 - 2024 Batch Onwards)
ADVANCED JAVA AND J2EE
Time : 2 Hours Max. Marks : 60
Note : Answer any six questions from Part - A and any one
full question of each Unit from Part - B.
PART _ A
1. a) What is an enumeration ? How enumeration can be created ? (6x2=121
b) List two advantages of Java Beans.
c) What is collection framework ? List any two goals of collection framework.
d) Write the differences between hasNextQ and next$ method.
e) Provide the syntax and an example for the charAt$ method to extract
characters from a string.
f) State two advantages of using distributed computing over centralized
computing.
g) What are servlets ?
h) What is the difference between the executeQueryO and executeUpdate$
methods of a statement object in JDBC ?
PAFIT _ B
Unit - |
2. a) Dernonstrate the usaEe of the valueOf$ and valuesQ methods with an
example.
b) With an example explain how enumeration values are used to control a
switch statement. (6+6)
3. a) What is Autoboxing and Unboxing ? Explain with an example.
b) Write short note on the following :
i) Bound and constrained properties
ii) Persistence. (6+6)
P.T.O.
BCACACN 602 I ilfllt ffi] flilt tilt ffiil ffi] fltflI llt tilt flil ril ril
Unit - ll
4. a) i) List any three methods of List interface with its purpose.
ii) What is an iterator ? Explain with an example.
b) Write a Java program that demonstrates the usage of a custom comparator
for sorting strings in reverse order. (6+6)
5. a) Explain the roles and responsibilities of the Model, View and Controller
components in the MVC architecture.
b) Explain the usage of the for-each loop in Java when working with collections.
Compare and contrast the for-each loop with the traditional approach of
using an Iterator. (6+6)
Unit - lll
6. a) With an example explain the four methods of StringBuffer class.
b) Outline the key steps involved in developing a basic Remote Method
lnvocation (RMl) Application. (6+6)
7. a) What is the usage of delete$ and deleteCharAt$ methods ? Explain them
using their syntax and an example.
b) Explain the Advantages and Disadvantages of distributed computing. (6+6)
Unit - lV
B. a) Explain the three key methods in the lifecycle of a servlet (initQ, servicefl,
destroy$).
b) Explain the following methods of HttpServletRequest interface with their
syntax
i) getCookies
ii) getMethod
iii) getPathlnfo
iv) getSession. (6+6)
9. a) Explain the key stages involved in the lifecycle of a Java Server Page (JSP).
b) i) What are the JDBC statements ? Explain.
ii) Explain the steps to connect to the database in java. (6+6)