0% found this document useful (0 votes)
48 views

Java All Unit Important Questions (RRSIMT)

Aktu

Uploaded by

Yashi Upadhyay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
48 views

Java All Unit Important Questions (RRSIMT)

Aktu

Uploaded by

Yashi Upadhyay
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Question Bank

BRANCH-CSE/AIML Even Semester 2023-24 SEMESTER: 4 th


UIT SUBJECT-OOPS with JAVA SUBJECT CODE-BCS403
UNIT- 1 (Concept of OOPS, Introduction to
CO-1
Java, Java Packages, Array and String)
Blooms Session
SECTION –A (SHORT ANSWER TYPE QUESTIONS) Taxonomy
Level
1 A Discuss JVM. K2
B Discuss JRE and JDK K2
C Compare C and Java K4
D Compare C++ and Java K4
E Discuss Bytecode. Also need of Byte code K2
F What do you mean by platform independent and architecture neutral K1
G State feature of Java K1
H State history of Java programming language K1
I State the applications of Java programming language K1
J Compare J2SE, J2EE and J2ME. K4
K Differentiate between “path” and “classpath” K4
L Differentiate between “javac” and “java” commands. K4
M Discuss datatype. Enlist all 8 primitive datatypes available in java K2
N Write a short note on following keywords: K2
i) static ii) abstract iii) final
O Differentiate between “this” and “super” keyword. Give example of both. K4
P Describe the role of an operator in performing an operation. Enlist all types of operators K2
available in java.
Q Differentiate between “extends” and “implements” keyword. Give example of both. K4
R Discuss package? How to use a package in a java program?Demonstrate the process of K3
creating a package.
S Discuss array?Give syntax to define an array. Create an array of type char of size 100. K3
T What do you mean by static import ? K2
SECTION –B (LONG ANSWER TYPE QUESTIONS)
2 A Discuss the concept of Object Oriented programming in detail. K2
B Design a blueprint of “Student” entity. Blueprint must contain constructors(all types), K6
instance variables(name,roll_no,course,branch,cumulative cgpa,dob),
methods(calculateCGPA, showStudentDetail).
C Discuss Encapsulation in detail. Relate it with real world scenario. K2
D Discuss Inheritance in detail. Relate it with real world scenario. K2
E Discuss Polymorphism in detail. Relate it with real world scenario. K2
F Discuss Abstraction in detail. Relate it with real world scenario. K2
G “Class is a user defined datatype”. Prove that the given statement is true. K2
H Design a shape interface which contains area and perimeter method. Design Rectangle, K6
Circle, Square classes which implements the shape interface.
I Discuss method overloading? Define a blueprint which demonstrates method overloading. K2,K6
J Dsicuss method over-ridding? Define a blueprint which demonstrates method over- K2,K6
ridding.
K Define a Vehicle interface with following prototypes: K6
 public void ignition()
 public void clutch()
 public void gearUp()
 public void gearDown()
 public void accelerate()
 public void applyBrake()
Define Car and Bike blueprint implementing Vehicle interface.
L Write down the steps to create a package with appropriate commands to compile and K1
execute.
M Write down a java program to implement linear searching in one dimensional array K1
N Write down a java program to implement binary searching in one dimensional array K1
O Write down a java program to implement bubble sorting in one dimensional array K1
P Write down a java program to create two matrices and find their sum. K1
Q Write down a java program to create two matrices and find their multiplication. K1
R Write down a java program to create a matrix and find its transpose. K1
S Outline the difference between Object oriented and procedural programming. K4
T Why multiple inheritance is not possible on java? How to implement it in java? K1
Question Bank
BRANCH-CSE/AIML Even Semester 2023-24 SEMESTER: 4 th
UIT SUBJECT-OOPS with JAVA SUBJECT CODE-BCS403
UNIT- 2 (Exception Handling, Multi-Threading
CO-2
Input and Output)
Blooms Session
SECTION –A (SHORT ANSWER TYPE QUESTIONS) Taxonomy
Level
1 A Discuss Exception? K2
B Discuss Exception handling? K2
C Discuss multithreading in Java? K2
D Discuss various ways to acheive multithreading achieved in Java? K2
E Discuss the advantages of multithreading? K2
F Discuss Thread in Java? K2
G Write down the steps to create a thread in Java? K1
H Explain the life cycle of a thread in Java. K2
I Explain synchronization in Java multithreading? K2
J Explain the difference between checked and unchecked exceptions in Java. K2
K Discuss the purpose of the try-catch block in Java exception handling? K2
L Discuss the purpose of the finally block in Java exception handling? K2
M Explain the difference between the throw and throws keywords in Java. K2
N Write down the steps to define custom exceptions in Java? K1
O What is the default priority of a thread in Java? K1
P Discuss the procedure to set the priority of a thread in Java? K2
Q State the primary classes used for handling input and output operations in Java? K1
R Explain the purpose of System.out.println() and System.out.print() methods. K2
S Explain the significance of the java.util.Scanner class in input operations. K2
T Enlist various methods of Scanner class to accept runtime input values in java. K1
SECTION –B (LONG ANSWER TYPE QUESTIONS)
2 A Explain the concept of inter-thread communication in Java. K2
B Explain the concept of thread priority in Java. K2
C Discuss Custom exceptions? Design a voting mechanism to generate custom mechanism if K2,K6
age is below 18.
D Discuss the various ways to read input from the console in Java? Provide an example. K2
E Discuss the various ways to open and read from a file in Java? K2
F Explain the difference between character streams and byte streams in Java IO. K2
G Discuss, how to handle exceptions that may occur during file input/output operations? K2
H Explain buffering in Java input/output operations? K2
I Discuss, how does using buffered input/output improve performance compared to K2
unbuffered operations?
J Provide an example of using buffered input/output streams in Java. K6
K Explain the concept of command-line arguments in Java. K2
L Discuss, how do you parse command-line arguments in a Java program? K2
M Discuss InputStreamReader class in detail. K2
N Discuss the role of the RuntimeException class in Java? K2
Question Bank
BRANCH-CSE/AIML Even Semester 2023-24 SEMESTER: 4 th
UIT SUBJECT-OOPS with JAVA SUBJECT CODE-BCS403
UNIT- 3 (New features in Java) CO-3
Blooms
SECTION –A (SHORT ANSWER TYPE QUESTIONS) Taxonomy
Session
Level
1 A Explain what a functional interface is in Java. Give an example. K2
B Define a lambda expression in Java. Provide an example of its usage. K2
C Discuss the benefits of using lambda expressions over anonymous classes. K2
D Discuss method references in Java? Give examples of different types of method K2
references.
E Explain the syntax and usage of method references in Java. K2
F Discuss Stream API in Java? How does it differ from collections? K2
G Describe common operations that can be performed using the Stream API. K2
H Give an example of using Stream API to filter a collection. K3
I Discuss default methods in Java interfaces? When are they used? K2
J Discuss the role of static methods in interfaces. K2
K Explain the purpose of Base64 encoding and decoding. K2
L Provide examples of encoding and decoding a string using Base64 in Java. K3
M Discuss the forEach method introduced in Java 8? How is it used? K2
N Compare the forEach method with traditional loops. K4
O Explain the purpose of the try-with-resources statement in Java? K2
P Give an example of using try-with-resources to automatically close resources like K3
files.
Q Explain the concept of type annotations in Java. K2
R Discuss the use of repeating annotations and when they are helpful. K2
SECTION –B (LONG ANSWER TYPE QUESTIONS)
2 A Discuss Java Module System introduced in Java 9? K2
B Describe the benefits of using modules in Java applications. K2
C Discuss the diamond syntax introduced in Java 7. K2
D Provide an example of using diamond syntax with an inner anonymous class. K3
E Explain local variable type inference introduced in Java 10? K2
F Explain how local variable type inference simplifies variable declarations. K2
G Describe the traditional switch statement in Java. K2
H Discuss the enhancements made to switch statements in Java 12 with switch K2
expressions.
I Explain the yield keyword introduced in Java 13? K2
J Explain usage and significance of yield keyword in introduced in switch. K2
K Explain text blocks introduced in Java 13? K2
L Provide examples demonstrating the usage of text blocks. K3
M Explain the concept of records introduced in Java 14. K2
N Describe sealed classes introduced in Java 15. K2
Question Bank
BRANCH-CSE/AIML Even Semester 2023-24 SEMESTER: 4 th
UIT SUBJECT-OOPS with JAVA SUBJECT CODE-BCS403
UNIT- 4 (Collection Interface in Java) CO-4
Blooms
SECTION –A (SHORT ANSWER TYPE QUESTIONS) Taxonomy
Session
Level
1 A Define the Java Collections Framework. K2
B Explain the purpose of the Collections Framework in Java. K2
C Discuss the advantages of using collections in Java programming. K2
D Describe the hierarchy of the Collection Framework in Java. K2
E Explain the relationships between different interfaces and classes in the hierarchy. K2
F Describe the difference between Collection and Collections in Java. K2
G Design a Java method that takes a Collection of strings and returns a list of those strings K3
in uppercase.
H Design a Java program that demonstrates how to use the removeIf method to remove all K3
even numbers from a Collection of integers.
I Implement a method that uses the Collection interface to find the intersection of two K3
collections.
J Which interface is part of the collection framework but does not extend the Collection K1
interface? Why?
K Give a difference between LinkedList and ArrayList in Java? K4
L Discuss the critical difference between a list and a set? K2
M Discuss the various interfaces used in Java Collections Framework? K2
SECTION –B (LONG ANSWER TYPE QUESTIONS)
2 A Give the difference between Array and Collection in Java? K4
B Discuss the advantages of the collection Framework? K2
C Differentiate between Comparable and Comparator interfaces in java K4
D Discuss Properties class in detail K2
E Discuss Queue Interface in Java? Explain Different operation in Queue Interface. K2
F Explain the Characteristics of a Queue Interface. K2
G Explain Set Interface and also its all Operations. K2
H Discuss Hashset in java? Explain its features and also about the various operation on the Hashset. K2
I Discuss LinkedHashSet? How it is differ form the HashSet? K2
J Explain SortedSet<E> interface with its methods. K2
K Explain the TreeSet and also discuss about the key points of the TreeSet. K2
L Discuss map Interface? Explain differenece between Map containsKey() and Map K2
containsValue().
M Discuss HashMap? Explain the internal working of a HashMap and also State the differences K2
between a Hashmap and a Hashtable in Java.
N Discuss LinkedHashMap in Java? Explain Important Features of a LinkedHashMap. K2
O Given an array of Pairs consisting of two fields of type string and integer. you have to sort K1,K3
the array in ascending Lexicographical order and if two strings are the same sort it based
on their integer value.
Sample I/O:
Input: { {"abc", 3}, {"a", 4}, {"bc", 5}, {"a", 2} }
Output: { {"a", 2}, {"a", 4}, {"abc", 3}, {"bc", 5} }
Input: { {"efg", 1}, {"gfg", 1}, {"cba", 1}, {"zaa", 1} }
Output: { {"cba", 1}, {"efg", 1}, {"gfg", 1}, {"zaa", 1} }
Question Bank
BRANCH-CSE/AIML Even Semester 2023-24 SEMESTER: 4 th
UIT SUBJECT-OOPS with JAVA SUBJECT CODE-BCS403
UNIT- 5 (Spring Boot) CO-5
Blooms
SECTION –A (SHORT ANSWER TYPE QUESTIONS) Taxonomy
Session
Level
1 A Discuss Spring Framework in java? State the features of Spring Framework? K2
B Discuss IoC (Inversion of Control) Container in Spring Framework? K2
C Explain Dependency Injection? K2
D Give the difference between constructor and setter injection? K4
E Explain Aspect-Oriented Programming (AOP)? Explain Spring AOP Features. K2
F Give the default scope in Spring, and how does it work? K1
G Discuss how does Spring manage singleton beans? K2
H Discuss how can you explicitly define a bean as a singleton in Spring XML K2
configuration?
I Give the difference between the singleton scope and the prototype scope in Spring? K4
J Explain, how can you define a bean as a prototype in Spring XML configuration? K2
K Explain, What will happens when you request a prototype bean multiple times? K2
L Explain the request scope in Spring, and when is it used? K2
M Explain, how can you define a bean as having request scope in Spring? K2
N Discuss the session scope in Spring, and when is it used? K2
O State the steps to define a bean as having session scope in Spring? K1
SECTION –B (LONG ANSWER TYPE QUESTIONS)
2 A Describe WebSocket, and how does it differ from traditional HTTP communication? K2
B Explain, how does Spring support WebSockets? K2
C Explain auto-wiring in Spring, and how does it work? State the different modes of auto-wiring in K2
Spring?
D Explain annotations in Spring, and why are they important? K2
E Enlist some commonly used Spring annotations? K1
F Discuss life cycle callbacks in Spring beans? Enlist the common life cycle callback methods in K2
Spring? Specify the order of execution for life cycle callbacks?
G Explain build systems, and why are they important in Spring Boot? What are the recommended K2
build systems for Spring Boot projects?
H Discuss about the question samples on Spring Boot Code Structure. K2
I Explain logging, and why is it important in Spring Boot applications? How does Spring Boot K2
handle logging?
J Discuss web services, and why are they important? What does REST stand for, and what are K2
RESTful web services? Which HTTP methods are commonly used in RESTful web services?
K Discuss REST Controller in Spring Boot? How do you create a REST API controller using Spring K2
Boot? What are the common HTTP methods used in a REST Controller?
L Discuss the purpose of @RequestMapping in Spring Boot? How do you use @RequestMapping at K2
the class level in a Spring Boot controller?
M Discuss the purpose of @PathVariable in Spring Boot? How do you use @PathVariable in a K2
Spring Boot controller?
N Discuss the purpose of @RequestParam? How do you use @RequestParam? K2
O Explain the CRUD REST APIs (GET, POST, PUT, DELETE) in Spring Boot. K2
P Discuss , How we can Building a Spring Boot Web Application? Explain with all Steps. K2

You might also like