0% found this document useful (0 votes)
2 views17 pages

Advanced Java and J2EE Important Question

The document outlines a series of questions categorized by units and probability levels, focusing on Java programming concepts such as enumerations, collections, remote procedure calls, and servlets. It emphasizes essential topics to prepare for, including Java Beans properties, MVC architecture, string manipulation methods, and JDBC processes. The questions are structured to guide study priorities based on their likelihood of appearing in exams.

Uploaded by

rakshabhat60
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)
2 views17 pages

Advanced Java and J2EE Important Question

The document outlines a series of questions categorized by units and probability levels, focusing on Java programming concepts such as enumerations, collections, remote procedure calls, and servlets. It emphasizes essential topics to prepare for, including Java Beans properties, MVC architecture, string manipulation methods, and JDBC processes. The questions are structured to guide study priorities based on their likelihood of appearing in exams.

Uploaded by

rakshabhat60
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

Long questions

UNIT-1
VERY HIGH PROBABILITY (Must
Prepare)
Q.1

With an example explain how enumeration values are used to control a switch
statement.

Q.2

Demonstrate the usage of the valueOf() and values() methods with an example.

Q.3

What does ordinal(), compareTo() and equals() method do in Enum? Give an


example.

Q.6

Describe the Wrapper classes available for primitive types.

Q.7

What Is Autoboxing And Unboxing? Explain with an example.

Q.9

What Are Annotations? What are the three retention policies defined by the
RetentionPolicy enumeration in Java?

Q.17

What are the different properties of a Java Bean? Explain with examples.

Q.18

Write short note on the following

 i. Bound and Constrained properties


 ii. Persistance
HIGH PROBABILITY
Q.8

With an example explain the steps involved to obtain annotation at run time
using reflection.

Q.10

Write an example program to illustrate reflection.

Q.11

Explain any four Built-in annotations.

Q.16

Discuss the key advantages that Java Beans provide to component developers.

Q.19

Write a note on simple properties in Java Beans.

Q.20

Write a note on indexed properties in Java Beans.

Q.21

What are the steps to be followed in creating a new Bean?

Q.22

Explain the purpose and usage of the following classes in the context of Java
Beans:

 Introspector
 PropertyDescriptor
 EventSetDescriptor
 MethodDescriptor
MEDIUM PROBABILITY
Q.4

Java Enumerations Are Class Types. Explain with an example.

Q.12

How do you specify a default value for an annotation member? Explain with
suitable example.

Q.15

How Can You Retrieve all Annotations that have RUNTIME retention by use of
reflection? Explain with an example.

Q.23

Write a note on EventDescriptor and PropertyDescriptor class.

LOW PROBABILITY
Q.5

Explain with example how Enumerations can Inherit Enum?

Q.13

Write an example of defining a marker annotation.

Q.14

Write an example of defining a single-member annotation.

If You Have Time for Only 10


Questions
Study these exact question numbers:

Q.2, Q.3, Q.6, Q.7, Q.8, Q.9, Q.10, Q.17, Q.18, Q.22
UNIT-2
VERY HIGH PROBABILITY (Must
Prepare First)
Q.3

What are the basic interfaces of Java Collections Framework? Discuss the
appropriate use of any four interfaces.
✅ Appeared in Question Paper

Q.13

What is an iterator? Explain with an example.


✅ Appeared in Question Paper

Q.20

Write a Java program that demonstrates the usage of a custom Comparator for
sorting strings in reverse order.
✅ Appeared in Question Paper

Q.24

Explain the roles and responsibilities of the Model, View, and Controller
components in the MVC architecture.
✅ Appeared in Question Paper

Q.25

Explain the flow of execution when a user interacts with an MVC-based Java
web application. Walk through the steps involved, starting from the user's
request, the role of the controller, the interaction with the model and view, and
finally, the response sent back to the user.
✅ Appeared in Question Paper

Q.9

With an example explain the usage of ArrayList.

Q.11

Write a Java program that demonstrates the usage of the LinkedList class from
the Java Collections Framework.
Q.19

Write a Java program that demonstrates the usage of the HashMap class from
the Java Collections Framework.

HIGH PROBABILITY
Q.1

Explain the benefits of Generics in Collections Framework.

Q.2

List any five methods of Collection interface with its purpose.

Q.4

List any five methods of List interface with its purpose.


✅ Partly appeared in Question Paper

Q.14

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.
✅ Appeared in Question Paper

Q.15

Explain how to store objects of user-defined classes in Java collections like


ArrayList.

Q.17

Write the usage of any four methods of Map interface.

Q.21

Write the usage of any 4 collection algorithms.


MEDIUM PROBABILITY
Q.7

List any five methods of Queue interface with its purpose.

Q.8

List any five methods of Deque interface with its purpose.

Q.10

Write a Java program that demonstrates how to convert an ArrayList to an


array using the toArray() method.

Q.12

Explain four constructors of the HashSet class from the Java Collections
Framework, including their parameters.

Q.18

What is a Map?

Q.22

Write a program to convert a given array into a collection with the asList()
method.

Q.23

Explain any four legacy methods of Vector.

LOW PROBABILITY
Q.6

Explain any four methods defined by NavigableSet interface.

Q.16

Write how Vector is differ from ArrayList.


If You Can Prepare Only 10
Questions
Study these exact question numbers:

Q.3, Q.9, Q.11, Q.13, Q.14, Q.19, Q.20, Q.21, Q.24, Q.25

These are the most likely questions for Unit II because:

 5 of them have already appeared in previous university papers.


 MVC questions (Q.24 & Q.25) are repeatedly asked.
UNIT-3
VERY HIGH PROBABILITY (Must
Prepare First)
Q.20

Explain the concept of Remote Procedure Calls (RPC) and its working
mechanism with its five key elements.
✅ Appeared in Question Paper

Q.23

Outline the key steps involved in developing a basic Remote Method Invocation
(RMI) application.
✅ Appeared in Question Paper

Q.24

Explain the Advantages and Disadvantages of distributed computing.


✅ Appeared in Question Paper

Q.7

Explain any four string comparison methods with an example.


✅ Appeared in Question Paper

Q.13

With an example explain the four methods of StringBuffer class.


✅ Appeared in Question Paper

Q.14

What is the usage of delete() and deleteCharAt() methods? Explain them using
their syntax and an example.
✅ Appeared in Question Paper

Q.2

With syntax and example explain the following String class methods

 a. getChars()
 b. replace()
✅ Appeared in Question Paper
HIGH PROBABILITY
Q.21

What is RMI? Explain its key components.

Q.22

Write short note on RMI Registry.

Q.16

Explain the concepts of object persistence and serialization in Java. Provide a


brief overview of each concept, highlighting their significance in software
development.

Q.17

Explain four key challenges associated with distributed computing systems.

Q.18

Describe the three key components that make up a Distributed Computing


System.

Q.1

With syntax and example explain the following String class methods

 a. split()
 b. regionMatches()

Q.3

With syntax and example explain the following StringBuffer class methods

 a. insert()
 b. deleteCharAt()

Q.4

With syntax and example explain the following StringBuffer class methods

 a. substring()
 b. lastIndexOf()
MEDIUM PROBABILITY
Q.6 Explain character extraction methods of String
class with an example.

Q.8 Explain the difference between the indexOf() and


lastIndexOf() methods in the String class. Give an
example for each method to illustrate their
functionality.

Q.9 Describe two common approaches for modifying


Strings in Java with an example.

Q.10 Explain the use of charAt() and setCharAt()


methods with suitable example.

Q.11 Explain the purpose of the valueOf() method in


the String class with an example.

Q.12 What is the use of replace() method? Explain.

Q.19 Explain how a Social Media platform can be


considered a Distributed Computing System. Identify
the key components involved and their roles.

LOW PROBABILITY
Q.5 Explain how to concatenate string with other data
types?

Q.15Explain in detail the method that is used by the


RMI client to connect to remote RMI servers?

If You Can Prepare Only 10


Questions
Study these exact question numbers:

Q.2, Q.7, Q.13, Q.14, Q.16, Q.20, Q.21, Q.22, Q.23, Q.24
UNIT-4
VERY HIGH PROBABILITY (Must
Prepare First)
Q.1

Explain the three key methods in the lifecycle of a servlet (init(), service(),
destroy()).
✅ Appeared in Question Paper

Q.6

Write a Java servlet named FormProcessorServlet that can handle HTTP POST
requests containing form data. The servlet should: Read Parameters, Process
Data, and Generate Response.
✅ Appeared in Question Paper

Q.7

Explain the following methods of HttpServletRequest interface with their syntax

 i. getCookies()
 ii. getMethod()
 iii. getPathInfo()
 iv. getSession()
✅ Appeared in Question Paper

Q.14

Explain the key stages involved in the lifecycle of a Java Server Page (JSP).
✅ Appeared in Question Paper

Q.17

Explain the steps in the JDBC process.


✅ Appeared in Question Paper

Q.20

Explain the steps to connect to the database in Java?


✅ Appeared in Question Paper

Q.21
What are the JDBC statements? Explain.
✅ Appeared in Question Paper

HIGH PROBABILITY
Q.2

Develop a basic servlet program that displays a welcome message to the user.

Q.4

Write the usage of any four methods of ServletRequest interface.

Q.5

Write the usage of any four methods of ServletResponse interface.


✅ Similar question appeared in Question Paper

Q.8

With an example, explain the purpose and behavior of the doGet() method in a
servlet class.

Q.9

With an example, explain the purpose and behavior of the doPost() method in a
servlet class.

Q.10

What are the different methods involved in the process of session management in
servlets? Explain their purpose.

Q.11

How cookies can be handled using servlet.

Q.13

Explain the key steps involved in how a web server processes a JSP request and
generates a web page.

MEDIUM PROBABILITY
Q.3

Explain the functionalities of the following methods available in ServletConfig


Interface.

Q.12

Explain why JSP is a compelling choice for web development compared to the
Common Gateway Interface (CGI).

Q.15

Write short note on JSP directives and JSP Actions.

Q.16

Explain any four buffer attributes with examples.

Q.22 Describe the following


 i) Scrollable ResultSet
 ii) Updatable ResultSet

Q.23 Write a note on DatabaseMetaData interface.

LOW PROBABILITY
Q.18 Write the steps to associate database with
JDBC/ODBC bridge.
(Older topic; JDBC-ODBC bridge is obsolete in modern
Java.)

Q.19 What is JDBC Driver? Explain different types.

Q.24 Explain the types of Exceptions occur in JDBC.

If You Can Prepare Only 10


Questions
Prepare these exact question numbers:

Q.1, Q.6, Q.7, Q.8, Q.9, Q.13, Q.14, Q.17, Q.20, Q.21
2 marks
Unit–I

Q1. With an example explain how enumeration values are used to control a switch
statement.

Q2. Demonstrate the usage of the valueOf() and values() methods with an example.

Q3. What does ordinal(), compareTo() and equals() method do in Enum? Give an
example.

Q9. What Are Annotations? What are the three retention policies defined by the
RetentionPolicy enumeration in Java?

Q11. Explain any four Built-in annotations.

Q17. What are the different properties of a Java Bean? Explain with examples.

Q18. Write short note on:

 i) Bound and constrained properties


 ii) Persistence

Unit–II
Q3. What are the basic interfaces of Java Collections Framework? Discuss the
appropriate use of any four interfaces.

Q13. What is an iterator? Explain with an example.

Q9. With an example explain the usage of ArrayList.

Q20. Write a Java program that demonstrates the usage of a custom Comparator for
sorting strings in reverse order.

Q24. Explain the roles and responsibilities of the Model, View and Controller
components in the MVC architecture.

Q25. Explain the flow of execution when a user interacts with an MVC-based Java
web application.

Unit–III

Q2. With syntax and example explain the following String class methods:
 a) getChars()
 b) replace()

Q13. With an example explain the four methods of StringBuffer class.

Q14. What is the usage of delete() and deleteCharAt() methods?

Q20. Explain the concept of Remote Procedure Calls (RPC) and its working
mechanism with its five key elements.

Q21. What is RMI? Explain its key components.

Q23. Outline the key steps involved in developing a basic Remote Method Invocation
(RMI) application.

Q24. Explain the Advantages and Disadvantages of Distributed Computing.

Unit–IV

Q1. Explain the three key methods in the lifecycle of a servlet (init(), service(),
destroy()).
Q6. Write a Java servlet named FormProcessorServlet that can handle HTTP POST
requests containing form data.

Q14. Explain the key stages involved in the lifecycle of a Java Server Page (JSP).

Q17. Explain the steps in the JDBC process.

Q19. What is JDBC Driver? Explain different types.

Q20. Explain the steps to connect to the database in Java.

Q21. What are the JDBC statements? Explain.

Q22. Describe:

 i) Scrollable ResultSet
 ii) Updatable ResultSet

You might also like