LePic
MOST IMPORTANT QUESTIONS
OOPS WITH JAVA
(BCS403)
Unit-01
LePic
QUESTIONS
Ques-Describe the architecture of Java and explain the roles of JVM, JRE, and JDK.
How do they interact in the program lifecycle?
Ques-With a neat diagram, explain the internal working of JVM. How does it ensure
platform independence in Java?
Ques-Explain the step-by-step Java program compilation and execution process.
What roles do javac and java commands play?
Ques-What is the role of the final keyword in Java? Explain how it applies to
variables, methods, and classes with code examples.
Ques-Illustrate the use of static variables, static methods, and static blocks in Java.
What are their execution rules and use cases?
Ques-Differentiate between compile-time and run-time polymorphism with suitable
code. Why is polymorphism essential?
Ques-Explain the concept of abstraction in Java. How is it achieved using abstract
classes and interfaces?
Ques-Differentiate between import and static import in Java. Give examples that
show when and why static import is preferred.
Ques-Explain the various types of inheritance in java with suitable diagram
Unit-02
LePic
QUESTIONS
Ques-Differentiate between Exceptions and Errors in Java. Classify Java exceptions
into checked and unchecked categories with examples.
Ques-Describe the control flow in Java when an exception occurs. How does the JVM
react if an exception is not caught?
Ques-Write a program that demonstrates the use of try, catch, finally, and throw.
Explain the role of each keyword in the exception handling process.
Ques- Explain the “throws” Keyword in Java with a suitable [Link] is it differ
from “throw” keyword.
Ques-Discuss the process of creating a user-defined exception in Java. Illustrate
with a program that throws a custom exception if age < 18.
Ques-Write a program to read data from a text file and write it to another file.
Ques-Describe the classes provided by Java under [Link] for performing file I/O.
How are BufferedReader and BufferedWriter different from FileReader and
FileWriter?
Ques-Compare byte streams and character streams in Java.
Ques-What is a thread in Java? Explain the life cycle of a thread with the help of a
well-labelled diagram and explanation.
Ques-Explain the following-
[Link] Synchronisation
[Link] Priorities
[Link]
Ques-Discuss the concept of inter-thread communication. How do wait(), notify(),
and notifyAll() methods work together to coordinate threads?
LePic
Unit-03
LePic
QUESTIONS
Ques-Define “functional Interface” and “lambda expression”. Implement any 4
built-in functional Interfaces
Ques-What is the role of the @FunctionalInterface annotation? Write a program
that uses a custom functional interface with lambda implementation.
Ques-Differentiate between intermediate and terminal operations in the Stream
API. Demonstrate with the use of filter, map, and collect.
Ques-Explain the architecture and working of Java Stream API.
Ques-What is the forEach() method in Java?Explain with a suitable code.
Ques- How does “static method” differs from “default method.
Ques- Explain Base-64 encoding and decoding with a suitable code.
Ques-Explain “type annotations” and “repeating annotations” with suitable
example.
Ques-briefly describe the “Yield Keyword”. Provide a suitable code to show the
working of yield keyword in switch Expression.
Ques-Explain the following terms-
[Link] Classes.
[Link] blocks
[Link]
[Link] variable type inference
Unit-04
LePic
QUESTIONS
Ques-Differentiate between the Collection and Collections classes in Java.
Ques-Describe the working of the Iterator interface. How is it different from a
ListIterator
Ques-How is Stack implemented using Java’s Collection Framework? Write a
program to demonstrate basic push/pop operations.
Ques-Compare ArrayList, LinkedList, and Vector
Ques-How does HashSet ensure uniqueness of elements? Explain the role of equals()
and hashCode()
Ques-What is the difference between HashSet, LinkedHashSet, and TreeSet? Explain
with examples
Ques-Describe how custom objects can be sorted in Java using Comparable and
Comparator
Ques-What is the need for the Java Collection Framework? How does it solve the
limitations of arrays in Java?
Unit-05
LePic
QUESTIONS
Ques-Explain the concept of Dependency Injection (DI) in Spring.
Ques-What is Inversion of Control (IoC) in the Spring Framework? How does the IoC
container manage the lifecycle of Spring Beans?
Ques-Describe the different bean scopes in Spring: Singleton, Prototype, Request,
Session, Application
Ques-How can @PostConstruct and @PreDestroy annotations be used to manage
bean lifecycle?
Ques-What is Autowiring in Spring? Explain different autowiring modes.
Ques-Define Aspect-Oriented Programming (AOP) in Spring. How is it useful in
cross-cutting concerns like logging and security?
Ques-Discuss the key features of the Spring [Link] the suitable reasons of
how spring boot is better than spring framework
Ques-How does Spring Boot differ from Spring MVC in terms of configuration and
rapid development support?
Ques-Define REST architecture. How does Spring Boot support RESTful web services
using annotations like @RestController and @RequestMapping?
Ques-Explain the structure of a typical Spring Boot application. What are the roles
of @SpringBootApplication and [Link]()?
LePic