Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
13 views

Java Programming July 2023

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

Java Programming July 2023

Bjogjkfhjvnm Ajay annaanakjakmmanbbzk
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Code No: R2022054 R20 SET - 1

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


JAVA PROGRAMMING
(Common to CSE, IT, CSE(CSBS), & CS)
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 a java program to read three numbers through the keyboard and find their sum [7M]
and average.
b) What is a variable? Explain their importance in java language. What rules to be [7M]
followed to define them?
Or
2 a) With the help of example program explain the various arithmetic operators [7M]
supported by java language.
b) List the various control statement. Explain any one control statement with the help [7M]
of flowchart and example program.
UNIT-II
3 a) In what way method overloading differs from overriding? Explain. [7M]
b) Why we need the methods to solve the problems? Explain recursive methods. [7M]
Or
4 a) Why we are using final classes and methods. Explain. [7M]
b) Give brief description about the various access control mechanisms used in java. [7M]
UNIT-III
5 a) Define an array. How can we initialize arrays? Explain. [7M]
b) Write java program to demonstrate the single inheritance. [7M]
Or
6 a) Write a program to multiple two matrices. [7M]
b) Enumerate the concept of Super Keyword with a suitable example. [7M]
UNIT-IV
7 a) Give brief description about the role of wrapper classes in java. [7M]
b) Write and explain the role of exception handling mechanism in java. [7M]
Or
8 a) Elaborate on Java.lang package and its classes. [7M]
b) Write a program to demonstrate the working of user defined exceptions. [7M]
UNIT-V
9 a) Write a java program to find any given string is palindrome or not without using [7M]
built-in functions.
b) In how many ways a thread can be created in java. Explain any one method. [7M]
Or
10 a) Write and explain the string buffer class. [7M]
b) Write a java program to implement thread priorities. [7M]

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

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


JAVA PROGRAMMING
(Common to CSE, IT, CSE(CSBS), & CS)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) What is Java? Describe the Basic rules to define java identifiers. [7M]
b) Explain the type and behavior of Java variables. [7M]
Or
2 a) Explain various types of iterative statements with suitable example. [7M]
b) Explain various types of Operators with example. [7M]
UNIT-II
3 a) Write a Java program to swap two numbers using call by reference. [7M]
b) What are various Member access rules explain with an example? [7M]
Or
4 a) Write a program to input any three numbers from the console & find out the [7M]
maximum number.
b) Demonstrate Nested class concept with an example. [7M]
UNIT-III
5 a) What is interface in java? What is the use of interface in java? [7M]
b) What is super keyword? Write a program to illustrate multilevel Inheritance? [7M]
Or
6 a) What do you mean by abstract classes and interfaces? Explain the need of interface [7M]
mechanism in programming.
b) How do you find all pairs of an integer array whose sum is equal to a given number? [7M]
UNIT-IV
7 a) What is exception handling? Explain the advantages of exception handling. [7M]
b) Briefly explain check exceptions and unchecked exceptions. [7M]
Or
8 a) What is the difference between Instant and Local Data Time? [7M]
b) Write various possible combinations of try catch finally. [7M]
UNIT-V
9 a) What are the states in the lifecycle of a thread? Explain with a neat diagram. [7M]
b) What is the difference between String Buffer and String Builder class? [7M]
Or
10 a) How to print total numbers of tables and views of a database using JDBC? [7M]
b) What is the purpose of the Synchronized block? [7M]
1 of 1
|''|'||||''|'''|||'|
Code No: R2022054 R20 SET - 3

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


JAVA PROGRAMMING
(Common to CSE, IT, CSE(CSBS), & CS)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) What do you understand by type casting & automatic promotion? Explain with [7M]
suitable examples.
b) Explain the concepts JDK, JRE and JVM. [7M]
Or
2 a) Illustrate the difference between java & C++. Why is Java language important in [7M]
relevance to the Internet?
b) Is java pure Object Oriented Language? Explain in detail. Mention the advantages & [7M]
disadvantages of java.
UNIT-II
3 a) Discuss the various levels of Access protection available for packages and their [7M]
implications.
b) Explain about the console input and output with an example. [7M]
Or
4 a) What are constructors? Explain different types of constructors with examples. [7M]
b) What is method overloading? Explain with an example program [7M]
UNIT-III
5 a) How many ways to find the duplicate elements in an array? Give an example? [7M]
b) What is dynamic binding? Explain with an example? [7M]
Or
6 a) How do you find all pairs of an integer array whose sum is equal to a given number? [7M]
b) Explain the concept of arrays of varying lengths and arrays as vectors. [7M]
UNIT-IV
7 a) Explain about wrapper classes, Auto-boxing and Auto-unboxing. [7M]
b) Elaborate on Time package, class instant and class object in detail. [7M]
Or
8 a) Explain formatter class and random class in java until classes. [7M]
b) Illustrate on how packages can be created, defined and accessed. [7M]
UNIT-V
9 a) What is multithreading? Mention the difference between process and thread. [7M]
b) Why are string objects immutable? How to create an immutable class? [7M]
Or
10 a) What is the string method in java? Explain. [7M]
b) Discuss in detail JDBC Architecture with a neat diagram. [7M]

|''|'||||''|'''|||'| 1 of 1
Code No: R2022054 R20 SET - 4

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


JAVA PROGRAMMING
(Common to CSE, IT, CSE(CSBS), & CS)
Time: 3 hours Max. Marks: 70
Answer any FIVE Questions each Question from each unit
All Questions carry Equal Marks
~~~~~~~~~~~~~~~~~~~~~~~~~
UNIT-I
1 a) Explain main( ) method in java. What is java’s magic byte code? Explain in detail. [7M]
b) What are java buzz words? Give brief description. [7M]
Or
2 a) Answer the following: [8M]
i. With the base of Unicode, Java platform has become better. Explain how?
ii. Describe all the primitive data types supported by Java with appropriate
examples and also specify their storage capacity/range.
b) Develop a program to compute factorial of a given number. [6M]
UNIT-II
3 a) Explain the uses of inner classes and local inner classes. With an example? [7M]
b) Develop a Java Program to create an abstract class named Shape that contains two [7M]
integers and an empty method named printArea(). Provide three classes named
Rectangle, Triangle and Circle such that each one of the classes extends the class
Shape. Each one of the classes contains only the method print Area () that prints the
area of the given shape.
Or
4 a) What is final keyword? Explain its importance in java with an example program. [7M]
b) Discuss in detail the concept of default constructor and constructor with default [7M]
arguments.
UNIT-III
5 Write short notes on the following [14M]
i) Functional interfaces
ii) Static methods in interface
iii) Annotations.

Or
6 a) Describe in detail dynamic method dispatch concept and also mention the difference [7M]
between Abstract class & interface.
b) What is the purpose of the wait(), notify(), and notifyAll() methods? Explain in [7M]
detail.
UNIT-IV
7 a) Briefly explain check exceptions and unchecked exceptions. [7M]
b) What are the JVM exceptions and programmatic exceptions? [7M]
Or

1 of 2
|''|'||||''|'''|||'|
Code No: R2022054 R20 SET - 4

8 a) What do you mean by Auto-boxing and Auto-Unboxing? Explain with a suitable [7M]
example.
b) Explain the control flow in nested try catch finally. [7M]
UNIT-V
9 a) How to detect a deadlock condition? How can it be avoided? [7M]
b) Differentiate between the Thread class and Runnable interface for creating a Thread. [7M]
Or
10 a) How to connect Java application with Oracle and MYSQL database using JDBC? [7M]
b) What is batch processing? What are the required methods in batch processing? [7M]

2 of 2

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

You might also like