Question Paper Code : 30120
B.E./B.Tech. DEGREE EXAMINATIONS, APRIL/MAY 2023.
Fourth Semester
Computer Science and Engineering
CS 3391 — OBJECT ORIENTED PROGRAMMING
(Common to : Biomedical Engineering/Computer Science and Design/Computer Science and Engineering (Artificial Intelligence and Machine Learning)/Computer Science and Engineering (Cyber Security)/Computer and Communication Engineering/Medical Electronics/Computer Science and Business Systems/Information Technology)
(Regulations 2021)
Answer ALL questions.
PART A — (10 × 2 = 20 marks)
- 1.
What is bytecode?
- 2.
Write the general form of the for-each version of the for statement.
- 3.
What is the use of final keyword?
- 4.
How dynamic method resolution is achieved in Java?
- 5.
List the values associated with the parameters of setpriority( ) method of Thread class?
- 6.
Define deadlock.
- 7.
State the purpose of Valueof( ) method in String class.
- 8.
List any two methods available in DataOutput Interface.
- 9.
What is the use of adapter class?
- 10.
List any two forms of CheckBoxMenuItem constructors.
PART B — (5 × 13 = 65 marks)
- 11.(a)
Explain in detail about Java's iteration statements with example.
- Or
- (b)
What is a Constructor? Explain with example.
- 12.(a)
What is a package? Explain in detail about how the packages provide access control to various categories of visibility for class members.
- Or
- (b)
Explain in detail about the basics of inheritance and elaborate on any two inheritance mechanisms in Java.
- 13.(a)
Explain in detail about Java's Built-in Exceptions. Explain any three exceptions.
- Or
- (b)
Discuss in detail about the methods to create a thread in Java.
- 14.(a)
Discuss in detail about the restrictions and limitations of using generics in Java Programming.
- Or
- (b)
Explain the following statement "StringBuffer class create mutable stings". Explain about StringBuffer class. Compare String class with StringBuffer class.
- 15.(a)
Explain in detail about the commonly used event listener interfaces with a sample program.
- Or
- (b)
Write a Java Program that demonstrates mouse event handlers.
PART C — (1 × 15 = 15 marks)
- 16.(a)
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.
- Or
- (b)
Write a java Program to copy a text file into another text file and to raise exceptions for all cases.