Oops Faq 2024
Oops Faq 2024
QUESTION BANK
CS 3391
OBJECT ORIENTED PROGRAMMING
Prepared by
V. NITHYA
AP/ IT
1. List the features of Object Oriented Programming? April 2024 , NOV/DEC 2017
2. Give an example for defining constant in Java? April 2024
3. What is an array? How multi-dimensional arrays are implemented in java? Dec 2023
6. What the general form of the for –each version of the for statement? MAY 2023
7. Define encapsulation? What is encapsulation? NOV/DEC 2020, APRIL/MAY 2021, NOV/DEC 2021,
APRIL/MAY 2017
9. Can a Java source file be saved using a name other than the class name? APRIL/MAY 2019
11. Define objects and classes in java? NOV/DEC 2018, APRIL/MAY 2019, APRIL/MAY 2017,
14. What is object oriented programming? MAY/JUNE 2016, APRIL /MAY 2017, APRIL/MAY 2019
18. Give an example for non-parameterized constructor? APRIL/MAY 2017 Or What is meant by
parameter passing constructors? Give example. NOV/DEC 2013
19. What is the default access to a member in a class? MAY/JUNE – 2011
33. Why oriented programming object is advantageous than structured programming? NOV/DEC 2019
34. Can a pointer be declared to a function which accepts one integer argument and returns an integer?
Explain with suitable code? NOV/DEC 2019
35. Define pointer. Give example? NOV/DEC 2018
36. What is an abstract data type? Give example? NOV/DEC 2018, APRIL/MAY 2018
37. What are enumerated data types? Give an example? NOV/DEC 2017
41. What is a class? Give an example for a class in java? APRIL/MAY 2018
44. “Java is robust”, Comment? Or Why is java language called as ‘robust’? MAY/JUNE 2016, DEC 2016
46. List the advantages of using object oriented programming? APRIL/MAY 2019, MAY 2019
51. Why do you need the preprocessor directive in a java program? NOV/DEC 2018
PART-B
1) i. List the symbols that are used in separators in java and present an outline? DEC 2023
ii. Outline the primitive types of data in java? DEC 2023
2) i. Outline the bitwise operators in java that can be applied to the integer type? DEC 2023
ii.Outline the while and do-while iteration statements in java with its general form? DEC 2023
3) Discuss the various access specifiers in Java? APRIL 2024
4) Explain java static members with examples? APRIL 2024
5) Explain in detail about Java’s iteration statements with example? MAY 2023
6) What is a Constructor? Explain with example? MAY 2023
7) i). Outline the arithmetic operators in Java. (6) NOV/DEC 2021
ii). Name the four integer types in Java and outline the bitwise operators that can be applied to the
integer types. (7) NOV/DEC 2021
8) (i) Outline the iteration statements in Java with syntax and example. (9) NOV/DEC 2021
(ii) Outline the use of constructors and this keyword in Java. (4) NOV/DEC 2021, NOV/DEC 2011,
MAY/JUNE 2014
9) a) i) How Java changed the internet? (9) NOV/DEC 2020
ii) If semicolons are needed at the end of each statement, why does the comment line not end with a
semicolon? (4) NOV/DEC 2020
10) What are the three categories of control statements used in Java? Explain each category with
example. (13) NOV/DEC 2020
11) i). Discuss the three OOP principles in detail? (7) Or explain the features of object oriented
programming with example? (16) DEC 2017, APRIL/MAY 2019
ii). What are literals? explain the types of literals supported by java (6) APRIL/MAY 2019
12) i). Explain the selection statements in java using suitable examples? APRIL/MAY 2019
ii). Write a java code using do –while loop that counts down to 1 from 10 printing exactly ten lines
of “hello”. APRIL/MAY 2019
13) i). Explain the characteristics of OOPS? (6) NOV/DEC 2018
ii). Explain the features and the characteristics of JAVA? (7) NOV/DEC 2018, APRIL/MAY 2018,
NOV/DEC 2011, MAY/JUNE 2014
14) i). What is method? How method is defined? Give example? (6) NOV/DEC 2018
ii). State the purpose of finalize () method in java? Write an example explain how finalize () method
can be used in java program? (7) NOV/DEC 2018
18) i). List our differences between procedure oriented programming & object oriented programming?
(9) MAY/JUNE 2016, APRIL/MAY 2017
ii). Explain about pointers with an example? (7) OR) When would you use a pointer to a
function? (13) APRIL/MAY 2019, MAY/JUNE 2016
19) i). Explain the characteristics of OOPS? (8) MAY/JUNE 2016, APRIL/MAY 2017
ii). Write a java program to list out prime numbers between the given tow limits? (8) MAY/JUNE
2016, NOV/DEC 2018
20) i). What are constructors? Explain the concept of destructor with an example? (8)
MAY/JUNE 2016, NOV/DEC 2018 , DEC 2017
ii). Explain array of objects with an example? (8) MAY/JUNE 2016
21) i). List out the characteristics of java? (8) MAY/JUNE 2016, APRIL/MAY2017, APRIL 2018
ii). Explain about dynamic method dispatch with an example? (8) MAY/JUNE 2016
22) i). Explain the various operations available in java? (6) APRIL/MAY 2017
ii). Explain about dynamic allocation in java? (7) APRIL/MAY 2017
23) Compare the features of c++ and java? APRIL/MAY 2018, Explain about java
features? APRIL/MAY 2017
24) Explain the different types of constructors in java with example? APRIL/MAY 2019, APRIL
2017, DEC 2017
25) What is meant by constructor? Describe the types of constructors supported by Java with example?
NOV/DEC 2014
26) Describe virtual functions with and example? APRIL/MAY 2019, NOV/DEC 2017
27) i). What is a constructor? What is the use of new method? (4) NOV/DEC 2010
ii). Give the syntax for static method and its initialization. (4) NOV/DEC 2010
iii). Explain arrays in java. (8) NOV/DEC 2010
28) i) Explain what is OOPS and explain the features of OOPS. (8) NOV/DEC 2011, MAY/JUNE 2014
(ii) Discuss about the usage of constructor with an example. Using Java. (8) NOV/DEC 2011,
MAY/JUNE 2014
29) Explain briefly about object oriented programming concepts differ from structured programming
concepts. (16) NOV/DEC 2011, How is OOP different from procedural programming language? (8)
MAY/JUNE 2013
30) Write a java program for push and pop operations in stack using arrays in classes and object. (16)
NOV/DEC 2011
31) i) Describe the concept of OOP. (5) NOV/DEC 2013
(ii) What is meant by overriding method? Give example. (5) MAY/JUNE 2014
(iii) Write a JAVA program to reverse the given number. (6)
32) Write a JAVA program to find the smallest number in the given list. (8) NOV/DEC 2013
33) i) Define class? (3) APR/ MAY 2015
ii) Write short notes on Access specifiers (3) APR/ MAY 2015
iii) string in JAVA
iv) Explain the term static fields and methods and explain its types with examples (8) APR/ MAY
2015
34) Define array. What is array sorting and explain with an example? APR/ MAY 2015
35) Write a java program to sort ten names in descending order. (16) MAY/JUNE 2012,
NOV/DEC 2014
36) State and explain documentation comments in java (8) APR/ MAY 2015
37) (i)What is class? How do you define a class in java? (4) NOV/DEC 2010
(ii) Explain the following in Strings: (4) NOV/DEC 2010 (1) Concatenation (2) Substrings.
(iii) Explain any four methods available in string handling. (4) NOV/DEC 2010
(iv) What is a Package? How does a complier locate packages? (4) NOV/DEC 2010
38) When a class hierarchy is creating, in what order are the constructors for the classed that make up
the hierarchy called? Outline with an example? (6) NOV/DEC 2021
39) Write a java program to find the sum of the following series? 1+2+3+4—+n (8) APRIL/MAY 2017
40) Explain in detail with an example about ADT’s in stack and queue. (13) APRIL/MAY 2019
(Or) Write the algorithm for implementing ADT’s in the base language? NOV/DEC 2019
41) Enlighten all the control statements supported by java with an example? (13) APRIL/MAY
2019, NOV/DEC 2019
42) Write a java program to generate the Fibonacci series? (5) APRIL/MAY 2019
43) i). Show the rules of precedence and associativity for the operators in java? (8) NOV/DEC 2017
44) ii). Explain the switch statement in java with examples? (5) NOV/DEC 2017
45) Outline the features of the object oriented programming paradigms? (13) NOV/DEC 2018
46) Write a java program to store ‘n’ names in an array name, sort the names in alphabetic order and
print the result. Use classes and member functions. (13) NOV/DEC 2018
47) Write a java program to accept a square matrix, find the transpose and print the result. Use classes
and member function? (8) NOV/DEC 2018
48) Explain the native data types and statements with suitable examples? (13) NOV/DEC 2019
49) Explain the difference between data hiding and data abstraction? (13) NOV/DEC 2019
50) How an object array is created in java? Explain with and example? NOV/DEC 2019
51) When a class hierarchy is created, in what order are the constructors for the classes that make up the
hierarchy called? outline with an example? (6) NOV /DEC 2021
UNIT II
PART A
1. Name the access modifiers in java? DEC 2023
2. Define inheritance? DEC 2023
3. Mention the use of constructor overloading? April 2024
4. Illustrate method overriding with an example? April 2024
5. What is the use of final keyword? MAY 2023
PART B
1. Outline method overloading and method overriding in java with code fragments? DEC 2023
2. What is an interface? How to define an interface? How one or more classes can implement an
interface? Outline with code fragments? DEC 2023
3. With an example explain the use of Abstract classes in Java? APRIL 2024
4. What is user defined package? How to create and import a user defined package? Explain
with example? APRIL 2024
5. What is a package? Explain in detail about how the packages provide access control to various
categories of visibility for class members.? MAY 2023
6. Explain in detail about the basics of inheritance and elaborate on any two inheritance mechanisms in
java? MAY 2023
7. Outline method overriding with an example? (7) NOV /DEC 2021
8. i). Write a note on interfaces are implemented in java with an example? (7) NOV /DEC 2021,
NOV/DEC 2020
ii). Outline how interfaces are implemented in java with an example? (6) NOV /DEC 2021
9. i). Write a java program for library interface with draw book (), return book () and check status ()
methods? (8) NOV/DEC 2022
ii). Explain Method overloading with an example? (4) NOV/DEC 2022
10. i). What are the advantages of using packages? (5) NOV/DEC 2022
ii). Illustrate how to add classes in a package and how to access these classes in another package? (8)
NOV/DEC 2022
11. Write a Java program to calculate electricity bill using inheritance. The programs should get the inputs
of watts per hour and unit rate.? Check your program for the following case: assume a consumer
consumes 5000 watts per hour daily for one month. Calculate the total energy bill of that consumer if
per unit rate is 7 [1 unit = 1kWh] (13) NOV/DEC 2020 Explain hierarchical and multi-level inheritance
supported by java and demonstrate the execution order of constructors to these types? (13)
APRIL/MAY 2019
12. Explain simple interface and nested try statements in java source file and explain? (7)
APRIL/MAY 2019
13. Present a detailed comparison between classes and interfaces? (6) APRIL/MAY 2019
14. Define inheritance? With diagrammatic illustration and java programs illustrate the different types of
inheritance example? (13) NOV/DEC 2018, APRIL/MAY2018, APRIL/MAY 2019, NOV/DEC
2016
15. Explain hierarchical and multilevel inheritances supported by java and demonstrate the execution order
of constructors in these types? (13) APRIL/MAY 2019
16. Write a Java program to create a student examination database system that prints the mark sheet of
Students. Input student name, marks in 6 subjects. This mark should between 0 and 100.
If the ave mark >=80 then prints Grade ‘A’
If the ave mark <80 and >=60 then prints Grade ‘B’,If the ave mark <60 and >=40 then prints
Grade ‘C’,‘else ‘, prints grade ‘fail’ (13) NOV/DEC 2018
17. Explain in detail about various types of inheritance in java with neat diagram? (13) NOV/DEC 2019,
NOV/DEC 2017, NOV/DEC 2019
18. What is an abstract class? Illustrate example to demonstrate abstract class? (13) NOV/DEC 2019
19. What is operator overloading? List out the rules to overload a binary operator? (7) MAY/JUNE 2016
20. Write a java program to add two vectors using +operator overloading? (9) MAY/JUNE 2016
21. i). What is inheritance? List out the advantages of inheritance? (7) MAY/JUNE 2016,
APRIL/MAY 2017
ii). Write a java program to implement multiple inheritance? (9) MAY/JUNE 2016, APRIL/MAY 2017
22. i). List out the advantages of overloading? (3) APRIL/MAY 2017
ii). Write a java program to overload +operator for concatenating two strings? (10) APRIL/MAY 2017
23. How to define an interface? Why do the members of interface are static & final? (7) MAY/JUNE 2016
24. Write a java program to implement nested packages? (9) MAY/JUNE 2016
25. Distinguish between
i). Inheritance and containership (3)
ii). Encapsulation and Inheritance (3)
iii). Writhe a java program to find whether the given string is palindrome or not (7) APRIL/MAY 2017
26. i). Discuss about benefits of abstract class? (3) APRIL/MAY 2017
ii). Explain dynamic method dispatch with an example? (10) APRIL /MAY 2017
27. i). What are the major differences between an interface and a class? (3) APRIL/MAY 2017
ii). Make a class Student. The student class has data members such as roll number, name, branch. Create
a class called Exam that has data members roll number and 6 subject marks. Derive the result class from
student and exam and it has its own data members such as total mark, and result. Write a java program
to model the relationships? (10) APRIL/MAY 2017
28. i). How do we add a class or interface to a package? (3) APRIL/MAY 2017
ii). Write a java program to implement nested packages? (10) APRIL/MAY 2017
29. What is a java interface? How to implement an interface? Explain with an example? (13)
APRIL/MAY2018, NOV/DEC 2017, NOV/DEC 2016, NOV/DEC 2019, NOV/DEC
2018
30. i). Write a java inheritance program, which should have 2 classes namely calculation and my
calculation. My calculation should inherit the methods addition () and subtraction of calculation of
classes? (8) APRIL/MAY 2019
ii). Write a java program to generate the Fibonacci series? (5) APRIL/MAY 2019
31. Explain the concept of polymorphism with example? (8) NOV/DEC 2017, NOV/DEC 2019
32. Explain the use of package in java with an illustrative example? (13) NOV/DEC 2017, NOV/DEC 2019
33. (i) Define package. Explain the types of package with its importance. (8) NOV/DEC 2011
(ii). What is package? How to add a class into a package? Give example. (8) MAY/JUNE 2011
34. Write a java program to calculate area of the object depending upon the shape given as input use
function overloading? (13) NOV/DEC 2019
35. What is meant by package? How it is created and implemented in JAVA. (8) NOV/DEC 2013
36. What is polymorphism? Explain the different types of polymorphism in java with an example?
NOV/DEC 2016, NOV/DEC 2019
37. Explain with an example the following features of Constructors: (16) MAY/JUNE 2011
(i) Overloaded constructors
(ii) A Call to another constructor with this operator
(iii) An object initialization block
(iv) A static initialization block
38. (i) Explain Inheritance and class hierarchy. (8) NOV/DEC 2010
(ii) Define Polymorphism. (2) NOV/DEC 2010
(iii) Write briefly on Abstract classes with an example. (6) NOV/DEC 2010
UNIT III
PART A
1. Outline the difference between unchecked exceptions and checked exceptions? DEC 2023
2. Name the methods used by java for inter-process communication to avoid polling? DEC 2023
3. Why to handle exceptions? APRIL 2024
4. What is thread priority? How it can be set for a thread? APRIL 2024
5. List the values associated with the parameters of set priority () method of thread class? MAY 2023
PART B
1. i. What is a Java exception? How java exception handling managed? Outline? DEC 2023
ii. Outline Java’s checked exceptions defined a java. Lang. package? DEC 2023
2. Present an outline of java’s multithreading system, also outline the two ways to create a thread? DEC
2023
3. Discuss about user defined exception in java, give suitable example? APRIL 2024
4. How thread synchronization is managed in java. Write example code. APRIL 2024
5. Explain in detail about Java’s built –in exceptions. Explain any three exceptions? MAY 2023
6. Discuss in detail about the methods to create a thread in JAVA? MAY 2023
7. i) . Differentiate between object oriented programming and procedure oriented programming? (7)
NOV/DEC 2022
ii). Write a java program to find the greatest of three numbers? (6) NOV/DEC 2022
8. i). Explain constructor with an example? (6) NOV/DEC 2022
ii). 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 () the grade of the student. (7) NOV/DEC 2022
9. i). “Java exception handling is managed via five keywords”. Name the five key words and present an
outline of an exception –handling block with syntax? (6) NOV/DEC 2022
ii). Present an outline of java’s checked exceptions defined in java. lang? (7) NOV/DEC 2021
10. i). Outline the states a thread can be in and specify the rules that determine when a context switch takes
place? (7) NOV/DEC 2021
ii). Present an outline of the methods used by java for interprocess communication? (6) NOV/DEC 2021
11. Write a short note on the following topics:
Uncaught exceptions (3)
Difference between throw and throws. Give example for both. (5)
Chained exceptions. Give example? (5) NOV/DEC 2020
12. Discuss the different states of thread in detail? (13) NOV/DEC 2020
13. Explain different types of exceptions in java? (13) NOV/DEC 2019
14. What is synchronization? Explain the different types of synchronization in java? (13) NOV/DEC 2019
15. What is a thread? Explain multithreading and multitasking in detail? (13) NOV/DEC 2019,
APRIL/MAY 2019
16. i). Discuss about exception and its advantages? (5) MAY/JUNE 2016
ii). Write a java program to generate an exception whenever user input is even number is less than
100? (11) MAY/JUNE 2016
17. i). Explain about dynamic method dispatch with an example? (8) MAY/JUNE 2016, APRIL/MAY 2017
ii). List out the characteristics of JAVA? (8) MAY /JUNE 2016
18. Write a java program to implement nested packages? MAY/JUNE 2016, APRIL/MAY 2017
19. i). What is the purpose of thread priorities? What are the different thread priorities that exist? (5)
NOV/DEC 2020
ii). What are bounded types? Why it is used? Give example? (8) NOV / DEC 2020
20. i). Give an example for nested try statements in java source file and explain? (7) APRIL/MAY 2019
ii). Write a note on built-in exceptions? (6) APRIL/MAY 2017
21. Describe the creation of a single thread & multiple threads using an example? (13) APRIL/MAY 2019
22. Using an example, explain inter-thread communication in java? (7) APRIL/MAY 2019
23. Explain the different types of exceptions & the exception hierarchy in java with appropriate examples?
(13) NOV/DEC 2018
24. Explain in detail the different states of a thread? (13) NOV/DEC 2018
25. Demonstrate Inter thread communication and suspending, resuming and stopping threads? (13)
NOV/DEC 2018
26. Explain the use of package in java with an illustrative example? (13) NOV/DEC 2017
27. What is exception handling? Explain with an example exception handling in java (13)
APRIL/MAY 2018, APRIL/MAY 2019, NOV/DEC 2018
28. Explain ‘Divide by zero’, Exception with an example java program? (7) APRIL/MAY 2019
29. i). Present an overview of exception handling in java? (5) NOV/DEC 2018
ii). Explain template in java with an example? (8) NOV/DEC 2018
30. Discuss in detail on how exceptions are handled with an appropriate example? (13) NOV/DEC 2019
31. How to create and use a package in java? What are the types of packages used in java? (13)
NOV/DEC 2019
32. i) Explain the concept of throwing and catching exception in java. (8) NOV/DEC 2010
ii). (ii) Explain the exception hierarchy. (8) NOV/DEC 2010, MAY/JUNE 2012, MAY/JUNE 2014
33. i) State the situations where assertions are not used. (4) NOV/DEC 2010, MAY/JUNE 2014
ii) Give an overview of logging. (4) NOV/DEC 2010
34. What is meant by exceptions? Why it is needed? Describe the exception hierarchy. Write note on Stack
Trace Elements. Give example. (16) NOV/DEC 2013
35. i)Define exception and explain its different types with example (8) APR/MAY 2015
ii) What is final keyword? Explain with an example? (8) APR/MAY 2015
UNIT IV
PART A
1. What are streams? DEC 2023
2. Why parameterized types are important? DEC 2023
3. Write any four methods associated with basic string class? APRIL 2024
4. What is a String Buffer class? APRIL 2024
5. State the purpose of Value of () method in String class? MAY 2023
6. List any two methods available in Data Output interface? MAY 2023
7. What is Thread Pool? NOV/DEC 2022
8. When a class must be declared as abstract? NOV/DEC 2022
9. Name the two ways to create a thread in Java? NOV/DEC 2021
10. What are the uses of streams? What are the two types of streams? NOV/DEC 2020
11. How to create a single class, which automatically works with different types of data?
Give example? NOV/DEC 2020
12. Give an example for reading data from files using File Input Stream? APRIL/MAY 2019
13. Give the syntax of generic class with an example? APRIL/MAY 2019
14. What is the use of assert keyword? NOV/DEC 2018, NOV/DEC 2019
15. What is the need for generic code? NOV/DEC 2018
16. What is generic programming? MAY/JUNE 2016, NOV/DEC 2019
17. Write the syntax for defining a function template? APRIL/MAY 2018
18. Is a string primitive data type? APRIL/MAY 2019
19. How generic programming is used in java? APRIL/MAY 2019
20. List the benefits using templates in java? NOV/DEC 2017
21. Write some java string class methods? NOV/DEC 2017
22. How do templates benefit a java developer? NOV/DEC 2018
23. How strings are stored in java? NOV/DEC 2019
24. What do you mean Synchronization? NOV/DEC 2010, MAY/JUNE 2012
25. What is meant by event-driven programming? NOV/DEC 2013, MAY/JUNE 2014 NOV/DEC 2014
26. What is meant by generic classes? Give example. NOV/DEC 2013
27. What is the need for generic programming? MAY/JUNE 2013
28. Write about simple generic class with an example. NOV/DEC 2011
29. What are Wildcard Types? MAY/JUNE 2011
30. Why generic programming is required? MAY/JUNE 2011
PART B
1. I. Outline reading console input and writing console output in java? DEC 2023
ii. Present an outline of file input stream and file output stream classes? DEC 2023
2. What is string buffer? Name and outline the constructors defined by string buffer with code
fragments? DEC 2023
3. Write a java program to read data from a file and to write data to a file? APRIL 2024
4. Discuss about Generic classes and Generic methods in Java? APRIL 2024
5. Discuss in detail about the restrictions and limitations of using generics in java programming? MAY
2023
6. Explain the following statement: “String buffer class create mutable strings “. Explain about String
buffer class. Compare string class with string buffer class? MAY 2023
7. i). Explain string buffer class with example? (6) NOV/DEC 2022
ii). Outline parameter type bounds with an example? (7) NOV/DEC 2022
8. Apply the string handling functions to do the following operations: (13) NOV/DEC 2022
i). compare the two strings
ii). Reverse the String – “Happy “
9. What is Input Stream? Present an outline of the methods defined by Input stream (13) Or What are input
and output streams? Explain them with illustrations? NOV/DEC 2018, NOV/DEC 2021
10. i). Why parameterized types are important? Outline Java generics with example? (7) NOV/DEC 2021
11. ii). Outline parameter type bounds with an example? (6) NOV/DEC 2021
12. How to perform reading and writing files? Explain with example? (13) NOV/DEC 2020
13. Create an IN file in Java to store the details of 100 students using a student class. Read the details from
IN file. Convert all the letters in IN file to lowercase letters and writes it into OUT file.? (13)
APRIL/MAY 2019
14. Write a generic method for sorting an array of integer objects? (6) APRIL/MAY 2019
15. Implement a class student. A student has a name and a total quiz score. Supply an appropriate
constructor and methods get name (), add quiz (int score), get total score (), get average score (). To
compute the latter, you also need to store the number of quizzes that the student took. (16)
MAY/JUNE 2016
16. i). Distinguish between arrays and strings? (3) MAY/JUNE 2016
ii). Explain the methods available in the String buffer class? (5) MAY/JUNE 2016
iii). Explain the use of command line arguments with an example? (8) MAY/JUNE 2016
17. i). What is generic programming? (3) APRIL/MAY 2017
18. ii). Explain function template with an example? (10) MAY/JUNE 2016 (Or) What is a template?
Outline the need for template in java and appraise with an example the different types of templates? (13)
APRIL/MAY 2018, APRIL/MAY 2019, NOV/DEC 2017, NOV/DEC 2018
19. Write a program to test whether the string is having specified prefix, if yes then it returns true else false?
(13) APRIL/MAY 2019
20. Write a java program concatenate the specified string at the end of the string? (6) APRIL/MAY 2019
21. Write a java program to accept a string, counts the number of vowels in the string and print the result (5)
NOV/DEC 2018
22. How Strings are handled in java? Explain with code, the creation of Substring, Concatenation and
testing for equality. (16) MAY/JUNE 2011
23. (i) Explain any four string operations in Java. With suitable examples. (8) NOV/DEC 2011
24. Explain string handling classes in Java with examples. (16) MAY/JUNE 2012
UNIT V
PART A
1. What is JavaFx? DEC 2023
2. Write a note on HBox and VBox? DEC 2023
3. Why JAVAFX is preferred for building internet applications? APRIL 2024
4. Write the constructors of HBox class? APRIL 2024
5. What is the use of adapter class? MAY 2023
6. List any two forms of check box menu item constructors? MAY 2023
7. What is a layout manager and what are different types of layout managers available in java AWT?
NOV/DEC 2022
8. Differentiate Hbox and VBox? NOV/DEC 2022
9. Name the two methods defined in java. util. Event object? NOV/DEC 2021
10. Draw the class hierarchy for panel and frame? NOV/DEC 2021
11. Write the sequence in which method calls takes place when an applet is terminated? NOV/DEC 2020
12. What are the key features of swing? NOV/DEC 2020
13. Write the class hierarchy for panel and frame? APRIL/MAY 2019
14. State the purpose of get Red (), get Blue (), and get Green () methods? APRIL/MAY 2019
15. What is meant by window adapter classes? NOV/DEC 2018
16. Enumerate the differences between the AWT in java? NOV/DEC 2018
17. Write the code segment to handle two mouse events? NOV/DEC 2019
18. What are the purposes of JPanel? NOV/DEC 2019 (Or) What is a JPanel object? MAY/JUNE 2011
19. State the features of Swing NOV/DEC 2013
20. What are the steps needed to show a Frame? NOV/DEC 2010
21. What is adapter class? MAY/JUNE 2013
22. Define frame. MAY/JUNE 2013
23. Mention any four event names of a button component. MAY/JUNE 2012
24. How do you manage the color and font of a graphics in applet? MAY/JUNE 2012
25. What is meant by window adapter classes? NOV/DEC 2011, NOV/DEC 2014
26. Differentiate Grid Bag Layout from Grid Layout? NOV/DEC 2011
27. How are frames created in Java? NOV/DEC 2011
28. Give the value for the following predefined actions. NOV/DEC 2011 (a) SMALL-ICON
(b) MNEMONIC-KEY
29. What method is used to distinguish between single, double and triple mouse clicks? MAY/JUNE – 2011
30. What is the function of a. Set Layout, b. Flow Layout? NOV/DEC 2010
PART B
1. What is a button? Name and outline the types of buttons provides with visual representations?
DEC 2024
2. Name and outline the types of panes Java Fx provides for nodes in a container? DEC 2024
3. With an example code explain how the key events are handled using JAVAFX ? APRIL 2024
4. Write a java program to illustrate the use of JAVAFX checkbox and choice box controls? APRIL
2024
5. Explain in detail about the commonly used event listener interfaces with a sample program? MAY
2023
6. Write a java program that demonstrates mouse event handlers? MAY 2023
7. i). List and explain the various layouts in java GUI? (8) NOV/DEC 2022 (Or) Describe in detail
about the different layouts in java GUI. Which layout is the default one? NOV/DEC 2018,
NOV/DEC 2019
ii). Explain the four types of buttons swing? (5) NOV/DEC 2022
8. Discuss the following with example: (13) NOV/DEC 2022
i). Mouse listener
ii). Mouse motion listener
9. What is AWT event class? Name the main event classes in java.awt. event and provide an outline of
when they are generated? (13) NOV/DEC 2021 (Or) State and explain the basic AWT event
handling in detail (13) NOV/DEC 2018
10. i). Outline the use of set size (), get size (), set visible () and set title () methods when working with
frame windows with their signature (8) NOV/DEC 2021
ii). Name the four types of buttons swing defines and present an outline of the same? (5)
NOV/DEC 2021
11. i). List any five different user interface components that can generate the events? (5)
NOV/DEC 2020
ii). Demonstrate any four mouse event handlers with examples? (8) NOV/DEC 2020
12. Describe how to work with graphics to display information within window? (13) NOV/DEC 2020
13. i). Use graphics objects to draw an arc and a semicircle inside a rectangular box? (4)
APRIL/MAY 2019
ii). Sketch the hierarchy of java AWT classes and methods. Create a “check box” using these classes
and methods? (9) APRIL/MAY 2019
14. i). State the differences between AWT and swing? (4) APRIL/MAY 2019
ii). Present the hierarchy of java swing classes and methods of component class. Create a simple
‘combo box ‘, in java swing using the classes and methods? (9) APRIL/MAY 2019
15. Discuss mouse listener and mouse motion listener. Give an example program? (13) NOV/DEC 2019
16. Explain about the concepts of creating and positioning of frame (8) APR/MAY 2015
17. Define Event handling write a program to handle a button event (8) APR/MAY 2015
PART C
1. Write a java program to accept n names, store it in an array, sort the names in alphabetic order and
display the result. Use classes and methods? DEC 2023
2. Write a java program to accept 2 squares matrics, and display the result, Use classes and methods?
DEC 2023
3. Design a class called ship that has the following members: name of the ship –string, year –the year
the ship built in integer, a constructor, get and set methods, to strings that displays the name of the
ship and year:
Extend a class cruise ship form with the following members: maximum number of passengers-
integer, a constructor, get and set methods, to string method that overrides base class to display the
name of the ship and number of passengers. Demonstrate the classes with ship array assigned with
ship and cruise ship objects and calling the respective to string method? APRIL 2024
4. A and B are any two players in a game which progresses by making alternate moves by the players.
Assume the odd moves are played by the player A and the even moves are played by the player B .
Define a class for generating the player move which implements runnable interface and ensures that
the player is operated with lock. Implement using thread pool so that A and B will get only the
alternative moves. The players can stop after making a total of 100 moves. APRIL 2024
5. 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? MAY 2023
6. Write a java program to copy a text file into another text file and to raise exceptions for all cases.? MAY
2023
7. 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? Consider each library as a thread that requests for a book for
purchase from the central library. If the requested book count is less than zero, then central library
provides an appropriate message to the appropriate requesting library. Implement using multithreading?
(15) NOV/DEC 2022, UNIT III
8. With neat example, explain java AWT Menu bars and Menu items? (15) NOV/DEC 2022, UNIT V
9. Write a java program to accept ‘n’ names, store it in an array, sort the names in alphabetic order and
display the result. Use classes and methods? (15) NOV/DEC 2021-UNIT I
10. Write a Java program to accept two squares matrices, store them in an array, add the matrices and
display the result. Use classes and methods? (15) NOV/DEC 2021-UNIT I
11. Write an AWT GUI application (called AWT counter) as shown in the figure. Each time the count
button is clicked, the counter value shall increase by 1? (15) NOV/DEC 2020-UNIT V
12. Write an address book class that manages a collection of person object. An address book will allow a
person to add, delete or search for a person object in the address book. NOV/DEC 2020-UNIT V
Add method: It should add a person object to the address book.
Delete method: It should remove the specified person object from the book.
Search method: It searches the address book for a specified person and return the list of persons
matching the specified criteria. The search can be done either by first name, last name or person
id.
13. The following is a system that can be used to synchronize threads in some shops a machine issues
numbered tickets to customers and customers are served in numeric order.
A ticket machine holds an integer, initially zero, and has a single atomic operation. turn () –
which increments the integer and returns its previous value.
A scheduler also holds an integer and returns its previous value. next () –which increments the
integer count, queue () – suspends the calling thread until the count is at least as large as the
value given as an argument.
Given a ticket machine, m and a scheduler’s, a critical region could then be coded as follows:
Number = m. turn ();
s. queue(number);
----protected code
s. next ();
Write java classes, Ticket machine, with a turn method, and scheduler, with next and queue methods to
implement the system. (15) APRIL/MAY 2019-UNIT V
Define java classes of your own without using any library classes to represent linked lists of integers.
Provide it with methods that can be used to reverse a list and append two lists. (15)
APRIL/MAY 2019-UNIT I
14. Create a Bank database application program to illustrate the use of multithreads? (15)
NOV/DEC 2018 -UNIT III
15. Code a java program to implement the following: Create four check boxes. The initial state of the first
box should be in checked state. The status of each check box should be displayed. When we change the
state of a check box, the status should be display is updated. (15) NOV/DEC 2018 -UNIT V
16. Develop a java program to find a smallest number in the given array by creating one dimensional array
and two dimensional array using new operator? (15) NOV/DEC 2019-UNIT I
17. Create a simple real life application program in java to illustrate the use of multithreads? (15)
NOV/DEC 2019-UNIT III
18. i). How to define an interface? Why do the members of interface are static and final? (7)
MAY/JUNE 2016 –UNIT II
ii). Write a java program to implement nested packages? (9) MAY/JUNE 2016 –UNIT II
28. i). Write a java program to sort an array of ‘N’ numbers in ascending order. Use classes and methods?
(8) NOV/DEC 2018-UNIT IV
ii). Write a java program to accept a string, reverse the string, check whether the string ins a palindrome
and print the result. Use classes and methods. Note: An example for palindrome: Consider the string
“MALAYALAM”, when you reverse the strong you get back the original string “MALAYALAM” and
hence the string “MALAYALAM” is a palindrome. (7) NOV/DEC 2018-UNIT IV
29. Write a program in java to demonstrate the significance of inheritance. Use different types of inheritance
and explain? (15) NOV/DEC 2019-UNIT II
30. Write a program in java to demonstrate the concept of interfaces and their implementation? (15)
NOV/DEC 2019-UNIT II