0% found this document useful (0 votes)
71 views

Object Oriented Programming With Java Jan 2023

dcdc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
71 views

Object Oriented Programming With Java Jan 2023

dcdc
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Code No: R2021422 R20 SET - 1

II B. Tech I Semester Regular/Supplementary Examinations, January - 2023


OBJECT ORIENTED PROGRAMMING WITH JAVA

(Com to CSE(AI), CSE (AI&DS), CSE( AI&ML), CSE (DS), AI&DS, AI &ML)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions, each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-1
1 a) With the help of suitable example program explain the implicit conversion. [7M]
b) Describe the various bitwise operators supported by java language. [7M]
OR
2 a) With the help of syntax, flow chart and example explain the while loop. [7M]
b) Write a java program to demonstrate the break and continue statements. [7M]
UNIT-II
3 a) What is meant by method overriding? Demonstrate it with suitable example [7M]
program.
b) Describe the visibility modifiers present in java language. [7M]
OR
4 a) In how many ways can we pass arguments to a function? Explain them in detail. [7M]
b) Write a java program to demonstrate the copy constructor. [7M]
UNIT-III
5 a) Write a java program to find the greatest number present in an array of whose [7M]
size is 8.
b) How can we implement multiple inheritance in java. Explain. [7M]
OR
6 a) Define an array? In what way an array variable differs from normal variable? [7M]
How can we declare and initialize them? Explain.
b) List the advantages of Inheritance. Write a program to demonstrate the single [7M]
level inheritance.
UNIT-IV
7 a) Discuss in detail about the access protection with respect to packages. [7M]
b) Differentiate between final, finally and finalize. [7M]
OR
8 a) Explain the following: i) Checked and Unchecked Exceptions (ii) Throw and [7M]
throws keywords
b) Explain about Auto-boxing and auto-unboxing Java with a program. [7M]
UNIT-V
9 a) Distinguish between process based and thread based multitasking. [7M]
b) Explain isalive(), join(), sleep() and main() methods. [7M]
OR
10 a) In how many ways a thread can be implemented? Explain any one technique [7M]
with suitable example.
b) Explain the step by step procedure for establishing JDBC database connections. [7M]

|'''|'|'|''|''||'||| 1 of 1
Code No: R2021422 R20 SET - 2

II B. Tech I Semester Regular/Supplementary Examinations, January - 2023


OBJECT ORIENTED PROGRAMMING WITH JAVA
(Com to CSE(AI), CSE (AI&DS), CSE( AI&ML), CSE (DS), AI&DS, AI &ML)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions, each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) Write about Java command line arguments and demonstrate the same with a java [7M]
program.
b) Write a java program to find individual digits of any given number. [7M]
OR
2 a) Distinguish between normal methods and static methods. [7M]
b) With the help of a flowchart, syntax and example program explain the working [7M]
of for loop in java.
UNIT-II
3 a) How can we access the private members of a class outside? Explain with [7M]
example program.
b) What is a constructor? List and explain the rules to define a constructor. [7M]

OR
4 a) What is a recursive method? In what way it differs from normal methods? Write [7M]
a java program to demonstrate the same.
b) What is a nested class? Distinguish between normal classes and nested classes. [7M]

UNIT-III
5 a) What is an interface? What is its role in java programming? Explain. [7M]
b) Write a java program to sort the elements of an array in descending order. [7M]

OR
6 a) Describe the method overriding with suitable example. [7M]
b) Write short notes on super keyword and abstract classes. [7M]

UNIT-IV
7 a) Give brief description about the wrapper classes. [7M]
b) Write a detailed note on checked and un-checked exceptions. [7M]

OR
8 a) Give the syntax to create a package in Java. How to set the path and class path [7M]
variables? Explain.
b) What is the necessity to rethrow an exception in Java? Illustrate the same with a [7M]
program.

1 of 2
|'''|'|'|''|''||'|||
Code No: R2021422 R20 SET - 2

UNIT-V
9 a) List the different ways that a thread can be implemented? Explain it by using [7M]
runnable interface.
b) Write a java program to sort the given set of strings as per the alphabetical order. [7M]

OR
10 a) Explain the sequence of steps for creating JDBC application. [7M]
b) Discuss the Java’s language level support for implementing Inter thread [7M]
communication.

2 of 2

|'''|'|'|''|''||'|||
Code No: R2021422 R20 SET - 3

II B. Tech I Semester Regular/Supplementary Examinations, January - 2023


OBJECT ORIENTED PROGRAMMING WITH JAVA
(Com to CSE(AI), CSE (AI&DS), CSE( AI&ML), CSE (DS), AI&DS, AI &ML)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions, each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) With the help of a example program, syntax and flowchart explain the working [7M]
of do while loop in java.
b) Describe the various logical operators and decrement/increment operators [7M]
supported by java.
OR
2 a) Write a java program to find the Fibonacci sequence of any given number. [7M]
b) Write the syntax of ‘switch’ statement and explain the significance of ‘break’ [7M]
and ‘default’ statements.
UNIT-II
3 a) Describe the constructor overloading with suitable example. [7M]
b) List and explain the various access specifies supported by java. [7M]

OR
4 a) Why we need static variables and methods. Explain. [7M]
b) Define a constructor? What rules to be followed to define them? Explain. [7M]

UNIT-III
5 a) Write a java program to demonstrate the concept of Dynamic method dispatch [7M]
and Trace the output to explain the same.
b) Develop a Java program to perform the multiplication of two matrices after [7M]
verifying the compatibility conditions.
OR
6 a) Write short notes on Interfaces, Nested interfaces and functional interfaces in [4M]
Java.
b) List out and explain the advantages of Inheritance. Discuss the types of [10M]
Inheritance supported by Java and explain the significance of ‘Super’ keyword.
UNIT-IV
7 a) Explain the step by step procedure to create, import and access packages in Java. [7M]
Write about any four standard Java packages.
b) With the help of example program explain the access protection in packages. [7M]

OR

1 of 2

|'''|'|'|''|''||'|||
Code No: R2021422 R20 SET - 3

8 a) What is an exception? In what an exception differs from error? Distinguish [7M]


between user defined and built-in exceptions.
b) Write short notes on i) wrapper classes ii) Temporal adjusters class [7M]
iii) throws clause
UNIT-V
9 a) With the help of neat sketch, explain the architecture of a typical JDBC. [7M]
b) List and explain the string modifying methods present in java. [7M]

OR
10 a) Describe the thread synchronization in detail. [7M]
b) Discuss about the race condition and dead lock. [7M]

2 of 2

|'''|'|'|''|''||'|||
Code No: R2021422 R20 SET - 4

II B. Tech I Semester Regular/Supplementary Examinations, January - 2023


OBJECT ORIENTED PROGRAMMING WITH JAVA
(Com to CSE(AI), CSE (AI&DS), CSE( AI&ML), CSE (DS), AI&DS, AI &ML)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions, each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~

UNIT-I
1 a) Describe about the various types of type casting in Java. [7M]
b) Write a java program to find whether any given number is a palindrome or not. [7M]

OR
2 a) With a neat flow chart, explain the execution behaviour of various loop [7M]
statements supported by Java.
b) Discuss about the role of command line arguments in java language. [7M]

UNIT-II
3 a) What is a class in Java? What are its members? Discuss various Access control [7M]
specifiers provided by Java to protect class members.
b) Write a java program to demonstrate the operator overloading. [7M]

OR
4 a) Write and explain the various techniques to pass arguments to a function. [7M]
b) Write a Java program to find the LCM of two numbers using Recursion. [7M]

UNIT-III
5 a) How can we implement interfaces? Explain with example program. [7M]
b) List the advantages of arrays over normal variables. Write a java program to find [7M]
the minimum and maximum value present in an array.
OR
6 a) Describe the importance of super keyword in java programming. [7M]
b) With the help of example program explain how to implement multiple [7M]
inheritance in java.
UNIT-IV
7 a) Write short notes on path and class path variables in Java, Random class and [7M]
Java Lang package and its classes.
b) List and explain the various keywords used in Java’s exception handling [7M]
mechanism.
OR
1 of 2

|'''|'|'|''|''||'|||
Code No: R2021422 R20 SET - 4

8 a) Discuss in detail about the access protection with respect to packages. [7M]
b) Give brief description about the nested try classes. [7M]

UNIT-V
9 a) Distinguish between multi threading and multi tasking? Explain process based [7M]
multitasking in detail.
b) In how many ways we can define a string in Java. Develop a java program to [7M]
extract a set of characters from given string.
OR
10 a) Discuss in detail about the thread priority and synchronization. [7M]
b) Describe the string buffer class in detail.

2 of 2

|'''|'|'|''|''||'|||

You might also like