Java QB 2023

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 4

Programming in Java

I MCA
Question Bank

Unit I

Part A

What are the core OOP’s concepts?


Identify access modifiers in Java with examples.
What are Lexical Issues?
Define Variable.
Differentiate Overloading Methods and Overloading Constructors.

Part B

Describe in detail the various control structures in java.


Write a program to implement Fibonacci series.
Describe Object oriented concepts of Java
Explain Java Buzzwords in detail
Define array. Explain the types of array with example.
Explain the various features of Object-Oriented Concepts in java
Explain java operator. List the various operators in java with suitable example.

Unit II

Part A

Define Object. How do you declare an object in Java?


Mention the characteristics of Constructors?
Write short notes on Garbage Collection.
Explain the uses of ‘this’ keyword with examples.
How do you pass objects as arguments?

Part B

Discuss about various types of constructor with example.


Distinguish Call by value and Call by reference with examples.
Explain about (i) static and final variables (ii) finalize() methods with examples.
Write an explanatory note on Nested and Inner Classes.
List the methods of String class. Explain each method with an example.
Explain in detail about the StringBuffer Class in Java.

Unit III

Part A

Discover different types of exception occur during runtime.


Define inheritance and mention its types
How does java support multiple inheritance?
What is Interface? Describe syntax, feature & need of an interface.
What is Exception? Give different types of exception that could occur during runtime.
Give a note on Dynamic method dispatch

Part B

Examine interface and its implementation with suitable example.


Write a program to input name and age of a person and throw an user-define exception, if the
entered age is negative.
Write in detail about the types of Inheritance and explain the purpose Super keyword in
inheritance
Explain working with Abstract class and Method and Using final with inheritance with
examples
Write in detail how to create a package and explain importing packages with suitable
examples
Explain Interfaces and its implementation in detail with example
Explain the following terms with respect to exception handling:
a. Try/Catch
b.Throw
c.Finally
d.Throws

Unit IV

Part A

Explain synchronization with example.


Explain Thread priorities and inter-thread communication in detail.
What is thread? Differentiate between multiprocessing & multithreading?
What is thread priority? Write the default values? Write methods to get & change priority of
thread.
Write about complete life cycle of thread.
What is synchronization? How do we achieve it?
Give a brief note on StringTokenizer with its constructors

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.

You might also like