Question Bank-BCS403-OOP With Java-Week Students
Question Bank-BCS403-OOP With Java-Week Students
Unit-1
1. Explain abstraction and abstract classes in Java. Describe abstract method. With a
suitable example demonstrate the application of abstract classes. (CO1, 2023-24)
2. Illustrate polymorphism and its types in Java. Differentiate between run-time and
compile-time polymorphism. Write super class Shape with method displayArea() and
sub class Rectangle. Demonstrate method overriding with this example. (CO1, 2023-24)
3. Illustrate Constructors and their applications in Java. Describe the types of constructors
used in Java. Write a class with name Student with attributes roll_number, name, branch
and email. Write all argument constructor for class Student and create two objects with
this constructor. (CO1, 2023-24)
4. What are interfaces? Illustrate how interfaces can be used for implementing multiple
inheritance. (CO1, 2023-24)
5. Define the concept of classes and object in Java with a suitable example. Explain
about different types of constructors in Java. Write a Java program to create a class
called "Employee" with a name and Id attribute. Create two instances of the
"Employee" class, set their attributes using the constructor, and print their name and
Id using instance method. (CO1, 2023-24)
6. Describe JVM and byte code in Java Architecture. Explain why Java is platform
Independent. Explain the difference between JDK, JRE and JVM with a suitable
diagram.(CO1, 2023-24)
Unit-2
7. Describe the ways to create the threads in Java with suitable code. Also explain which
method is more suitable to create threads. (CO2, 2023-24)
8. Differentiate between checked and unchecked exceptions in Java. Write a Java
program to demonstrate Arithmetic Exception handlings. (CO2, 2023-24)
9. Explain life cycle of a thread in multithreading with neat and clean diagram. What is
impact of sleep() method on thread lifecycle. (CO2)
10. Differentiate between with suitable examples: 1. Character streams and Byte Streams 2.
wait() and notify() (CO2, 2023-24)
11. Demonstrate a custom exception class in Java to handle invalid age input for voting
eligibility. (CO2)
12. Develop a Java program that accepts an array of integers and calculates the average value.
Implement appropriate exception handling to catch and manage
ArrayIndexOutOfBoundsException. (CO2)
Unit-3
13. Explain the functional interfaces in Java. Describe lambda expressions with the help
of functional interfaces. (CO3, 2023-24)\
14. Explain Java stream API and its applications. Describe Intermediate and terminal
operations with suitable example. Write a program to print sum of all even numbers
form an ArrayList containing all integers from 1 to 10. (CO3, 2023-24)
15. Compare and contrast switch-case statement with switch-expression. Explain use of
yield keyword in Java with suitable example. (CO3, 2023-24)
16. Explain the concept of Sealed classes in Java with suitable example. (CO3, 2023-24)
17. Explain method reference and its types along with syntax of each.(CO3)
18. Explain default and static method in Interface with suitable example. (CO3)
Unit-4
19. Discuss the Comparable and Comparator interfaces in Java. When would you implement
each interface, and what are their respective use cases? Write a Java program to
implement a custom Comparator for sorting a list of objects based on multiple
criteria.(CO4)
20. Write a Java program to create an ArrayList with five items and display all the
elements using forEach method. (CO4, 2023-24)
21. Describe Collections framework in Java with a suitable diagram displaying interfaces
and classes and their hierarchy. Also explain the List, Set and Queue interfaces. (CO4,
2023-24)
22. Describe Linked List in Java collection framework. With suitable example describe
any five methods available in Linked Lists. (CO4, 2023-24)
23. Describe HashMap in Java collection framework. With suitable example describe any
five methods available in HashMaps. (CO4, 2023-24)
24. What are the key differences between HashMap, LinkedHashMap, TreeMap, and
Hashtable in Java? (CO4)
25. Describe the differences between HashSet, LinkedHashSet, and TreeSet. Provide
examples of scenarios where each would be most appropriate. (CO4)
Unit-5
26. Describe following
1. Spring container
2. Spring bean life cycle (CO5, 2023-24)
27. Describe following
3. Spring boot framework and its benefits
4. RESTFUL API with Spring boot. (CO5, 2023-24)
28. Explain the difference between Dependency Injection (DI) and Inversion of Control (IoC)
in Spring. (CO5, 2023-24)
29. Explain Spring Boot Architecture with a suitable diagram. Describe the Spring IoC
container. What are its main responsibilities? (CO5)
30. Write a code for simple Spring application using annotations, xml or java to configure
beans and demonstrate dependency injection. (CO5)