Java QB 2023
Java QB 2023
Java QB 2023
I MCA
Question Bank
Unit I
Part A
Part B
Unit II
Part A
Part B
Unit III
Part A
Part B
Unit IV
Part A
Part B
Write about the following with suitable example (a) Creating a Thread by Extending Thread
Class (b)Creating a Thread by implementing Runnable Interface.
Discuss the following: (1) Explain multiple thread. (2) Write a program to define two
threads. One thread will print 1 to 10 number whereas other will print 10 to 1 numbers.
Explain Thread priorities and inter-thread communication in detail.
Explain vector class in detail with example
Write in detail about stack class.
Explain GregorianCalendar class in detail.
Unit V
Part A
Write a program to copy content of one file to another using character stream class
Write about Event Sources
List the most important event classes and write about AWT Event class in brief.
Write about Understanding Layout Managers
Describe different stream classes.
Give a note on ComponentEvent Class and ContainerEvent Class in brief
Part B
Examine ActionEvent and AdjustmentEvent Classes with constructors and methods in detail.
Define stream and explain the Types of streams with suitable examples
Write about MouseEvent Class in detail with its constructors
Explain Event Listener Interfaces in detail
Explain AWT control fundamentals and explain any 3 controls in detail
Explain (a) InputEventClass (b) ItemEvent Class (c) KeyEvent Class
Overall
What are the different salient features that the Java language provides?
How do you declare and initialize a one-dimensional array in Java, and how do
you access and modify the elements of the array?
What is Object Oriented Programming? Discuss the various OOPs principles in
Java
What is an interface in Java? How does a class implement an interface, and how
does it use the methods defined in the interface?
How do you use the Scanner class in Java to read input from the user, and what
are some of the available methods for parsing and extracting different types of
data (e.g., integers, doubles, strings) from the input stream?
Differentiate between Method Overloading and Overriding in Java
How do you handle events in a Java program using event listeners and event
objects? What are the steps for implementing an event listener interface, and how
do you register an event listener with a component to receive notifications of
events?
What is a constructor in Java, and how do you define and use constructors to
create objects of a class? How do constructors differ from other methods?
Write a program in Java to display student id and name using default and
parameterized constructors.
Discuss the working of 'continue', 'break' and 'return' statements in a Java loop.
Discuss the advantages of incorporating packages in Java
What is Inheritance and explain the terms parent class and child class? State the
advantages of Inheritance in Java
What are some of the common methods for manipulating strings in Java, and
how do you use these methods to perform tasks such as concatenation, searching
and replacing?
Explain the following keywords with context to inheritance in Java - extends and
this
Discuss the differences between checked and unchecked exceptions in Java.
What is Deadlock in Java? What are the precautions to avoid a deadlock state in
Java ?
With regards to event handling, describe the different Layout Managers in Java.
With the help of suitable examples, explain the different kinds of operators in
Java.
With the help of suitable examples, discuss in detail the Java AWT Buttons and
AWT Labels.
Describe in detail the String constructor in Java.
Write a code in java to execute multiple catch block.Class name as
'MultipleCatchBlock' and initialize an array and using array implement
arithmeticexception, array index out of bounds exception and general exception.
Explain in detail the following:
a. life cycle of thread
b. thread and its advantages.
With the help of suitable examples, discuss the various access modifiers in Java.
Difference between Multilevel Inheritance and Hierarchical Inheritance in Java.
Support your answer with suitable code examples.