Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

1|Page https://hemanthrajhemu.github.

io

-----------------------------------------------------------------------------------------
ADVANCED JAVA AND J2EE
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 -2018)

SEMESTER – V
Subject Code 17CS553 IA Marks 40
Number of Lecture Hours/Week 03 Exam Marks 60
-----------------------------------------------------------------------------------------
These Questions are being framed for helping the
students in the “FINAL Exams” Only (Remember for
Internals the Question Paper is set by your respective
teachers). Questions may be repeated, just to show
students how VTU can frame Questions.
- ADMIN
----------------------------------------------------------------------------------------
Module 1
----------------------------------------------------------------------------------------
1. What is auto-boxing? Write a program to demonstrate auto-
boxing/unboxing. (5-Marks) (1a) (Dec.2018/Jan.2019)

2. What do you mean by type wrapper? Explain numeric type wrapper with
an example program in JAVA. (5-Marks) (1b) (Dec.2018/Jan.2019)
3. Explain the following methods of java.lang.Enum with an example:

i. ordinal( )
ii. compareTo( )
iii. equals( ) (6-Marks) (1c) (Dec.2018/Jan.2019)

4. Demonstrate single annotation with an example. (4-Marks) (2a)


(Dec.2018/Jan.2019)

5. Explain following built-in annotations with a program in Java:


i. @Override
ii. @Inherited
iii. @Retention (6-Marks) (2b) (Dec.2018/Jan.2019)

https://hemanthrajhemu.github.io
2|Page https://hemanthrajhemu.github.io

6. Explain different retention policies for annotations in Java. (6-Marks)


(2c) (Dec.2018/Jan.2019)

7. What is an Enumeration? Explain with an example. (5-Marks) (1a)


(June/July 2018)

8. Demonstrate how enumerations can be applied as class types. (5-Marks)


(1b) (June/July 2018)
9. Discuss Auto boxing/unboxing in Java with an example. (6-Marks) (1c)
(June/July 2018)

10. What is an Annotation? Explain various retention policies for


annotations in java. (5-Marks) (2a) (June/July 2018)

11. Discuss how reflections can be used at runtime with annotations. (6-
Marks) (2b) (June/July 2018)
12. Demonstrate single member annotations with an example. (5-Marks)
(2c) (June/July 2018)

13. What are Enumerations? Explain values ( ) and value of ( ) ‘methods


with an example program. (4-Marks) (1a) (Dec.2017/Jan.2018)
14. What is Auto boxing? Write a Java program that demonstrates auto
boxing or unboxing. (4-Marks) (1b) (Dec.2017/Jan.2018)
15. What are Annotations? Explain the following Built in Annotations with
program as an example @Override @inherited @Retention. (8-Marks)
(1c) (Dec.2017/Jan.2018)
16. Explain the following methods of java.Jang.Enum with an example
program.

i. ordinal( )
ii. compareTo( )
iii. equals( ) (8-Marks) (2a) (Dec.2017/Jan.2018)

17. Explain how to obtain Annotations at Run Time by use of Reflection.


(8-Marks) (2b) (Dec.2017/Jan.2018)

----------------------------------------------------------------------------------------
ANSWER SCRIP FOR THESE
QUESTIONS WILL BE UPLOADED ASAP

https://hemanthrajhemu.github.io
1|Page https://hemanthrajhemu.github.io

-----------------------------------------------------------------------------------------
ADVANCED JAVA AND J2EE
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 -2018)

SEMESTER – V
Subject Code 17CS553 IA Marks 40
Number of Lecture Hours/Week 03 Exam Marks 60
-----------------------------------------------------------------------------------------
These Questions are being framed for helping the
students in the “FINAL Exams” Only (Remember for
Internals the Question Paper is set by your respective
teachers). Questions may be repeated, just to show
students how VTU can frame Questions.
- ADMIN
----------------------------------------------------------------------------------------
Module 2
----------------------------------------------------------------------------------------
1. Explain ArrayList. Write a program to demonstrate how ArrayList can be
used to insert and remover string. (8-Marks) (3a) (Dec.2018/Jan.2019)

2. Explain Queue interface. Explain different methods defined by Queue. (8-


Marks) (3b) (Dec.2018/Jan.2019)
3. Create a class STUDENT with two private string members: USN, Name
using LinkedList class in Java, write a program to add atleast 3 objects of
above STUDENT class. Also display the data in neat format. (8-Marks)
(4a) (Dec.2018/Jan.2019)

4. Explain ArrayList class and explain following methods:

i. binarySearch
ii. copyOf
iii. equals
iv. fill (8-Marks) (4b) (Dec.2018/Jan.2019)

5. Discuss the following collection interfaces:


i) Set

https://hemanthrajhemu.github.io
2|Page https://hemanthrajhemu.github.io

ii) List. (8-Marks) (3a) (June/July 2018)

6. Demonstrate linked list for collections with an example. (8-Marks) (3b)


(June/July 2018)

7. Explain how collections can be accessed using an iterator. (8-Marks) (4a)


(June/July 2018)

8. Explain the following legacy classes with an example:


i. Hashtable
ii. Vector. (8-Marks) (4b) (June/July 2018)

9. What is a collection Framework? And explain the methods defined by


collection interface. (08 Marks) (3a) (Dec.2017/Jan.2018)

10. Explain the methods defined by. List Iterator interface. (8-Marks) (4a)
(Dec.2017/Jan.2018)
11. Explain the constructors of TreeSet class and write a java program to create
TreeSet collection and access it via an Iterator. (08 Marks) (4a)
(Dec.2017/Jan.2018)
12. Explain any four legacy classes of Java’s collection Framework (8-Marks)
(4b) (Dec.2017/Jan.2018)

----------------------------------------------------------------------------------------
ANSWER SCRIP FOR THESE
QUESTIONS WILL BE UPLOADED ASAP
Visit:
https://hemanthrajhemu.github.io
THANK YOU
--------------------------------------------------------------------------------------

https://hemanthrajhemu.github.io
1|Page https://hemanthrajhemu.github.io

-----------------------------------------------------------------------------------------
ADVANCED JAVA AND J2EE
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 -2018)

SEMESTER – V
Subject Code 17CS553 IA Marks 40
Number of Lecture Hours/Week 03 Exam Marks 60
-----------------------------------------------------------------------------------------
These Questions are being framed for helping the
students in the “FINAL Exams” Only (Remember for
Internals the Question Paper is set by your respective
teachers). Questions may be repeated, just to show
students how VTU can frame Questions.
- ADMIN
----------------------------------------------------------------------------------------
Module 3
----------------------------------------------------------------------------------------
1. Explain following StringBuffer methods with an example:
i. insert
ii. append
iii. replace
iv. substring (8-Marks) (5a) (Dec.2018/Jan.2019)
2. Differentiate String and StringBuffer class. Write a program to
demonstrate different construction of String class. (8-Marks)
(5b) (Dec.2018/Jan.2019)
3. Write a program to remove duplicate characters from a given
string and display the resultant string. (06 Marks) (6a)
(Dec.2018/Jan.2019)
4. Differentiate between equals( ) and = = with respect to string
with a program. (06 Marks) (6b) (Dec.2018/Jan.2019)

https://hemanthrajhemu.github.io
2|Page https://hemanthrajhemu.github.io

5. Explain following character extraction method:


i. charAt( )
ii. toCharArray( ) (4-Marks) (6c) (Dec.2018/Jan.2019)
6. Explain why do we need strings. Briefly explain different ways
of creating strings. (05 Marks) (5a) (June/July 2018)
7. Write a program to remove duplicate characters in a given
string and display new string without any duplicates. (5-Marks)
(5b) (June/July 2018)
8. Explain how strings can be modified in Java with different
methods. (6-Marks) (5c) (June/July 2018)
9. What String Buffer? Explain how it is different from strings.
(6-Marks) (6a) (June/July 2018)
10. Explain the following String Buffer methods:
i. insert ( )
ii. append ( )
iii. substring ( )
iv. replace ( ). (6-Marks) (6b) (June/July 2018)
11. Explain how to check the occurrences of a substring or
characters in a given string. (4-Marks) (6c) (June/July 2018)
12. What is string in java? Write a Java program that demonstrates
any four constructors of string class. (08 Marks) (5a)
(Dec.2017/Jan.2018)
13. Differentiate between equals ( ) and = = with respect to string
comparison. (04 Marks) (5b) (Dec.2017/Jan.2018)
14. Explain the following character Extraction methods.
i. Chart A+( )
ii. tochar Array ( ) (4-Marks) (5c) (Dec.2017/Jan.2018)
15. Explain how to modify a string by using following methods.

https://hemanthrajhemu.github.io
3|Page https://hemanthrajhemu.github.io

i. substring ()
ii. concat ( )
iii. replace ( )
iv. trim ( ) (8-Marks) (6a) (Dec.2017/Jan.2018)
16. Explain the following methods of stringBuffer class.
i. append ()
ii. insert ()
iii. reverse ()
iv. replace. (8-Marks) (6b) (Dec.2017/Jan.2018)
----------------------------------------------------------------------------------------
ANSWER SCRIP FOR THESE
QUESTIONS WILL BE UPLOADED ASAP
Visit:
https://hemanthrajhemu.github.io
THANK YOU
--------------------------------------------------------------------------------------

https://hemanthrajhemu.github.io
1|Page https://hemanthrajhemu.github.io

-------------------------------------------------------------------------------------
ADVANCED JAVA AND J2EE
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 -2018)

SEMESTER – V
Subject Code 17CS553 IA Marks 40
Number of Lecture Hours/Week 03 Exam Marks
60
-------------------------------------------------------------------------------------
These Questions are being framed for helping the
students in the “FINAL Exams” Only (Remember for
Internals the Question Paper is set by your
respective teachers). Questions may be repeated,
just to show students how VTU can frame Questions.
- ADMIN
-------------------------------------------------------------------------------------
Module 4
-------------------------------------------------------------------------------------
1. What is the role of Tomcat server? Explain
different steps involved in configuring for
development of servlet program execution. (8-
Marks) (7a) (Dec.2018/Jan.2019)
2. Write a Java servlet program to accept two
parameters from webpage, find the sum of
them, display the result in web page. Also give
necessary html script to create web page. (8-
Marks) (7b) (Dec.2018/Jan.2019)
3. Explain different JSP tags with a program to
demonstrate all tags. (8-Marks) (8a)
(Dec.2018/Jan.2019)

https://hemanthrajhemu.github.io
2|Page https://hemanthrajhemu.github.io

4. What are cookies? How cookies are handled in


JSP? Write a program to create with name
“Username” and cookie value “xyz”. Also display
stored cookie in webpage. (8-Marks) (8b)
(Dec.2018/Jan.2019)
5. Explain the life cycle of a servlet. (4-Marks) (7a)
(June/July 2018)
6. Demonstrate how servlet can accept
parameters from HTML. (6-Marks) (7b)
(June/July 2018)
7. Explain how cookies can be handled using
servlets. (6-Marks) (7c) (June/July 2018)
8. Explain how session trading can be done with
servlets. (4-Marks) (8a) (June/July 2018)
9. Demonstrate how parameters can be accessed
from HTML using JSP. (6-Marks) (8b)
(June/July 2018)
10. Explain how cookies can be handled using JSP.
(6-Marks) (8c) (June/July 2018)
11. Explain the Life cycle of Servlets. (4-Marks) (7a)
(Dec.2017/Jan.2018)
12. List and explain core classes and interfaces in
javax.servlet package. (8-Marks) (7b)
(Dec.2017/Jan.2018)
13. Write short note on: HTTP request and
response. (4-Marks) (7c) (Dec.2017/Jan.2018)
14. What is a Cookie? List, out methods defined by
Cookie? Write a java program to add a Cookie.
(8-Marks) (8a) (Dec.2017/Jan.2018)

https://hemanthrajhemu.github.io
3|Page https://hemanthrajhemu.github.io

15. Define JSP. Explain different types of JSP tags


by taking suitable example. (8-Marks) (8b)
(Dec.2017/Jan.2018)
-------------------------------------------------------------------------------------
ANSWER SCRIP FOR THESE
QUESTIONS WILL BE UPLOADED
ASAP
Visit:
https://hemanthrajhemu.github.io/AnswerScri
pt
THANK YOU
Join Telegram Channel to receive Instant Updates..

https://t.me/joinchat/AAAAAFTtp8kuvCHALxuMaQ

-------------------------------------------------------------------------------------

https://hemanthrajhemu.github.io
1|Page https://hemanthrajhemu.github.io

-----------------------------------------------------------------------------------------
ADVANCED JAVA AND J2EE
[As per Choice Based Credit System (CBCS) scheme]
(Effective from the academic year 2017 -2018)

SEMESTER – V
Subject Code 17CS553 IA Marks 40
Number of Lecture Hours/Week 03 Exam Marks 60
-----------------------------------------------------------------------------------------
These Questions are being framed for helping the
students in the “FINAL Exams” Only (Remember for
Internals the Question Paper is set by your respective
teachers). Questions may be repeated, just to show
students how VTU can frame Questions.
- ADMIN
----------------------------------------------------------------------------------------
Module 5
----------------------------------------------------------------------------------------
1. What are database drivers? Explain
different JDBC driver types. (8-Marks) (9a)
(Dec.2018/Jan.2019)
2. List and explain various statement objects
in JDBC. (8-Marks) (9b)
(Dec.2018/Jan.2019)
3. Explain different steps involved in JDBC
process, with a code snippet. Also give
exception handling block. (8-Marks) (10a)
(Dec.2018/Jan.2019)
4. Write a program to connect to database
with following information:

https://hemanthrajhemu.github.io
2|Page https://hemanthrajhemu.github.io

Drive: JDBC/ODBC bridge


URL: “jdbc.odbc:Ex”
Username: “xyz”
Password: “123”
Retrieve all rows with marks > 60 using
prepared statement object. Assume
following table:
Table Name : STUDENT
Fields : USN-Varchar (20)
Marks-int
Name-Varchar (25) (8-Marks) (10b)
(Dec.2018/Jan.2019)
5. List and explain various JDBC driver types.
(9-Marks) (9a) (June/July 2018)
6. Explain what are the basic steps involved in
database connection. (7-Marks) (9b)
(June/July 2018)
7. List and explain various statement objects
in JDBC. (7-Marks) (10a) (June/July 2018)
8. What is Result set? Explain types of Result
sets in JDBC. (5-Marks) (10b) (June/July
2018)
9. Explain the types of exceptions occurred in
JDBC. (4-Marks) (10c) (June/July 2018)
10. Explain the four types of JDBC drivers. (6-
Marks) (9a) (Dec.2017/Jan.2018)

https://hemanthrajhemu.github.io
3|Page https://hemanthrajhemu.github.io

11. Describe the various steps of JDBC with


code. snippets. (10-Marks) (9b)
(Dec.2017/Jan.2018)
12. Write a Java program to execute a database
transaction. (8-Marks) (10a)
(Dec.2017/Jan.2018)
13. Explain:
i. Callable statement object
ii. Prepared statement object (8-Marks)
(10b) (Dec.2017/Jan.2018)
----------------------------------------------------------------------------------------
ANSWER SCRIP FOR THESE
QUESTIONS WILL BE UPLOADED ASAP
Visit:
https://hemanthrajhemu.github.io/AnswerScript
THANK YOU
Join Telegram Channel to receive Instant Updates..

https://t.me/joinchat/AAAAAFTtp8kuvCHALxuMaQ

--------------------------------------------------------------------------------------

https://hemanthrajhemu.github.io

You might also like