Oop QB
Oop QB
QUESTION BANK
PART-A
2. Write the general form of the for-each version of the for statement? (Apr/May 2023)
4. Can we access parent class variables in child class by using super keyword? (NOV/DEC 2022)
5. What is an array? How multidimensional arrays are implemented in Java? (NOV/DEC 2023)
PART-B
1. Explain in detail about Java’s iteration statements with example. (Apr/May 2023)
4. Write a Java program to find the greatest of three numbers. (NOV/DEC 2022)
6. Write a Java program to display the grade of the Students by using get() method to get marks
and compute() method to compute the average and display() method to display the grade of the
students. (NOV/DEC 2022)
7. List the symbols that are used as separators in Java and present an Outline of the Same. (NOV/DEC
2022)
9. Outline the bitwise operators in Java that can be applied to the integer type. (NOV/DEC 2022)
10. Outline while and do-while iteration statements in Java with its general form.
1. Write a Java program to accept ‘n’ names, store it in an array, sort the names in an alphabetic
order and display the result. Use Classes and methods. (NOV/DEC 2022)
2. Write a Java program to accept two square matrices, store them in an array, add the matrices and
display the result. Use classes and methods. (NOV/DEC 2022)
10. Write a Java program to write a Do-While loop that Counts to 1 from 10?
PART-A
4. Can we access parent class variable in child class by using super keyword. (NOV/DEC 2022)
6. How cans a subclass can call a constructor defined by super class. (NOV/DEC 2022)
PART-B
1. What is a Package? Explain in detail about how the packages provide access control to various
categories of visibility for class members. (Apr/May 2023)
2. Explain in detail about the basics of inheritance and elaborate on any two inheritance
mechanism in Java. (Apr/May 2023)
3. Write a Java program for library interface with drawbook() returnbook() and checkstatus()
methods. (NOV/DEC 2022)
5. IIustrate how to add classes in a package and how to access these classes in another package.
(NOV/DEC 2022)
6. Outline the method overloading and method overriding in Java with code fragments. (NOV/DEC
2022)
7. What is an Interface? How to define an interface? How one or more classes can implement an
interface? Outline with code fragments. (NOV/DEC 2022)
8. With an example, explain the use of Abstract classes in Java. (Apr/May 2024)
11. What is an Inheritance? How will you call parameterized constructor and overrideed method from a
parent class in sub class?
12. Write a Java program to calculate Area of rectangle using the Single Inheritance?
PART-C
1. What is user defined package? How to create and import a user defined package? Explain with
an example? (Apr/May 2024)
8. Differentiate between the Abstract class and interfaces with an example program?
10. State the purpose of Finalize () method in Java? Write an example explain how finalize () method can
be used in Java?
UNIT III Exception Handling and Multithreading
PART-A
1. List the values associated with the parameters of set priority () method of Thread class? (Apr/May
2023)
5. Outline the difference between unlocked exception and checked exception. (NOV/DEC 2022)
6. Name the methods used by Java for interprocess communication to avoid polling. (NOV/DEC 2022)
8. What is thread priority? How it can be set for a thread? (Apr/May 2024)
9. What is Multithreading?
PART-B
1. Explain in detail about Java’s Built-in Exceptions. Explain any there exceptions. (Apr/May
2023)
2. Discuss in detail about the methods to create a thread in Java. (Apr/May 2023)
3. Create a software for departmental stores to maintain the following details like item_no,
item_description, requested quantity, cost price. Provide the options to update the stock.
Calculate the selling price(SP=CP*20%).
Create an exception whenever the selling price of items exceeds the given amount. (NOV/DEC
2022)
4. Discuss about try, catch and finally Keywords in Exception Handling with an example.
(NOV/DEC 2022)
5. List and explain Data types and their Corresponding Wrapper class. (NOV/DEC 2022)
6. What is Java exception? How Java exception handling is managed? Outline. (NOV/DEC 2022)
8. Present an outline of Java’s Multithreading system. Also outline the two ways to create a thread.
(NOV/DEC 2022)
9. Discuss about user defined package? How to create and import a user defined package? Explain with
example. (Apr/May 2024)
13. Describe the creation for single thread and multiple threads using an example?
1. Create a Central Library management system with libraries in different locations in a city.
Each Library can order a book from the central library and give it to the requesting customers.
Availability of that book should be updated on each lending. (NOV/DEC 2022)
2. Write a Java program with nested try statements that raises divide by zero exception and out of bound
exception, if the program contains statements with division operator and a divisor as a command line
argument. (Apr/May 2023)
3. How thread Synchronization is managed in Java. Give suitable example. (Apr/May 2024)
4. What is meant by Concurrent programming? Define thread. Discuss the two ways of implementing
thread using an example?
10. Draw the exception Hierarchy in java and explain with example throwing and catching exception and
the common exception?
PART-A
2. List any two methods available in Data Output Interface. (Apr/May 2023)
7. Write any four methods associated with basic string class. (Apr/May 2024)
20. Write a Java Code to check if the command line argument is file or not?
24. Can generic be used with Inheritance in Several ways? What are they?
PART-B
1. Discuss in detail about the restrictions and limitations of using generics in Java Programming.
(Apr/May 2023)
2. Explain the following statement “String Buffer class create mutable stings”. Explain about
StringBuffer class. Compare String class with StringBufferclass. (Apr/May 2023)
8. Outline reading console input and writing console output in Java. (NOV/DEC 2022)
10. What is StringBuffer? Name and outline the constructors defined by StringBuffer with code
fragments. (NOV/DEC 2022)
11. Write a Java program to read data from a file and write data to a file. (Apr/May 2024)
12. Write a simple Java program to check the PALINDROME of the given String?
13. Write the Java program illustrating the difference between the capacity and length function of
StringBuffer?
15. Explain the generic classes and generic methods with an example?
PART-C
1. Write Java program to copy a text file into another text file and to raise exceptions for all
cases. (Apr/May 2023)
2. Discuss about Generic classes and generic methods in Java. (Apr/May 2024)
3. Explain in detail about Reading and writing files? (NOV/DEC 2019)
4. Write a Java program to collect the input as a decimal number of integer type and converts it into a
String equivalent hexadecimal number?
5. Explain in detail about Generic method with an example?
6. Mention the motivation of generic programming?
7. Explain in detail about the following with an example
(i) Reading from a File (ii) Writing in a File
10. Differentiate the generic classes and generic methods in Java with an example?
Unit V Javafx Event Handling, Controls and Components
PART-A
3. What is layout manager and what are different types of Layout managers available in java
AWT. (NOV/DEC 2022)
19. Explain the term- Stage and scene used n JavaFX application?
PART-B
1. Write a java program with nested try Statements that raises divide by zero exception and out
of bound exception, if the program contains a statement with division operator and a divisor as a
command line argument. (Apr/May 2023)
2. Write a java program to copy a text file into another text file and to raise exceptions for all
cases. (Apr/May 2023)
3. List and explain the various layouts in java GUI. (NOV/DEC 2022)
6. What is button? Name and outline the types of buttons JavaFX provides with visual
representations. (NOV/DEC 2022)
7. Name and outline the types of panes JavaFX provides for organizing nodes in a container.
(NOV/DEC 2022)
8. With an example code explain how the key events are handled using JAVAFX. (Apr/May 2024)
9. Write and explain the constructors and commonly used methods for menu.
10. Write a JavaFX applications to display menu, menu bar and menu items.
1. With neat example, Explain Java AWT Menu bars and Menu items. (NOV/DEC 2022)
2. Write a Java program to illustrate the use of JAVAFX checkbox and choice box controls. (Apr/May
2024)
9. Write a JAVA program to display the mouse position in the form of (x,y) Co- Ordinates when the text
on the screen is dragged somewhere else.