0% found this document useful (0 votes)
34 views5 pages

21CS642 JAVA IMP

The document outlines a comprehensive curriculum covering various Java programming concepts, including enumerations, annotations, generics, strings, servlets, JSP, and JDBC. Each module contains multiple questions and programming tasks designed to explore the functionalities and implementations of these concepts in Java. The curriculum emphasizes practical programming examples and theoretical explanations to enhance understanding of Java's features.

Uploaded by

bhagyajyothi151
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
34 views5 pages

21CS642 JAVA IMP

The document outlines a comprehensive curriculum covering various Java programming concepts, including enumerations, annotations, generics, strings, servlets, JSP, and JDBC. Each module contains multiple questions and programming tasks designed to explore the functionalities and implementations of these concepts in Java. The curriculum emphasizes practical programming examples and theoretical explanations to enhance understanding of Java's features.

Uploaded by

bhagyajyothi151
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

MODULE 1

1. What are enumerations? Explain values() and valueOf() methods with


example program.
(08 Marks)

2 Define Enumerations. Develop a Java program to implement the


following burit-in methods and explain: (i) values( )
(ii) valueOR)
(iti) ordinal()
CompareTo()
Equals()

3 How to use an enum constructor, instant variable and method Explain with
example.

4 What is autoboxing? Write a Java program that


demonstrates autoboxing/unboxing occurs inside expressions.
(06 Marks)

5 What are annotations? Explain various retention policies for annotation


in Java. (06 Marks)

6 Explain the following built-in annotations:


(i) override
(ii) inherited
(iii) retention
Iv Supress warnings
V Target

7 Explain the following with respect to


annotations Single member annotations.
Default values in annotations

8 Explain the various type wrappers used in Java.

9 Demonstrate marker annotations with example.1

10 Briefly explain Numeric Type wrappers.

11 1What is an Annotation?
12 What is Wrapper class? Explain the foilowing with example
Boxing
Un-Boxing
Auto-boxing
Auto-unboxing

MODULE 2

1 What are Generics?Give one example program.

2 Explain how generics improve Type safety.

3 Write a program on Generic Interface.

4 Write note on i)Bounded Wildcards ii)Eraasure

5 Write a program that contain generics class with two type

parameters. 6 Explain how generics improve Type safety.

7 Write a program on Generic Constructor.

8 Write note on i)Bounded Types ii)Ambiguity Errors

MODULE 3

1 What is string in Java? Write a Java program that demonstrates


constructors of String class.
(08 Marks)

2 What is string in Java? Explain the different constructors of string class.


Also difference between String Class and String Buffer class.

3 Explain the following StringBuffer methods with an example:


(i) insert ii) append (iii) replace (iv) substring

4 Differentiate between equals() and = = with respect to string

comparison. 5 Explain the following StringBuffer class with examples:


(i) capacity)
(ii) reverse()
(iii) charAt() (iv) deleteCharAt(),length(),insert(),replace(),delete ( ),
append (),substring () (08 Marks)

6 Write a program to remove duplicate characters from a given string


and display the resultant string.
(08 Marks)

7 How compareTo() method differs from compare ToIgnoreCase () method?


(04 Marks)

8 Explain any two character extraction methods of String class.

9 Write a java program to sort array of Strings using compareTo() function.

10 Explain indexOf() and lastIndexOf() methods of String class with


an example.

11 Explain any four String modification methods of String class.

12 Explain how to check the occurance of a substring in a given

string. 13 Explain any two character handling functions in string class.

14 Write a java program to sort names in Bubble sort.

15 Explain the string comparison functions with suitable programs.

16 What is toString() function? Write a program to override toString()


and provide you wo string representations.

17 write a program in java to replace all the matching substring with a


given string

MODULE 4

1 What is a Servlet? Explain the life cycle of Servlet

2 Explain the difference between servlets and CGI programs.

3 Describe the core interfaces that are provided in Javax.Servlet.http package.


4 What is JSP? Explain the various types of JSP tags with
examples. (10 Marks)

5 List the difference between JSP and servlet and also explain the different
JSP tags with
example.

6 What are cookies? How cookies are handled in JSP? Write a JSP program
to create and read a cookie.
(10 Marks)

7 What is Cookie? List out the methods defined by Coôkie? Write a


Java program to add a Cookie.

8 Write a program using servlet which contains HTML page with various
color options. When user choose 8th.
particular color, the background of that page should be changed accordingly.
(08 Marks)

9 Write a short note on Session Tracking.

10 Write a Servlet program to accept parameter from html (username


and password and display.

11 Explain the role of Tomcat server in

servlets. 12 Explain sessions and cookies in

JSP.

13 How arrays are defined in JSP?

14 Write a Java servlet program that demonstrate how parameters can


be accessed fro

15 What is a session object? Write the program to create and Read


session object, using JSP

MODULE 5

1 What are database drivers? What is JDBC? Explain the different JDBC driver
types.

2 Describe the various steps of JDBC with code snippets


3 Write any two syntax of established a connection to a database.

4 What is connection pooling? Explain connection pooling with neat


diagrams with code snippets.

5 What is statement object in JDBC? Describe the following concepts:


Scrollable result set
Callable statement
Transaction processing
Updatable result set
Prepared Statement Object

6 What is transaction processing? Write a Java program to execute a


database transaction.

7 Explain transaction processing in JDBC.

8 Explain ScrollableResultSet and OpdatableResultSet object in

JDBC. 9 Explain the types of exceptions occurred in JDBC.

10 Explain the use of object in establishing the connection also write a program
to call stored procedure

11 Explain undatable Result set with a programming example

You might also like