0% found this document useful (0 votes)
19 views1 page

Java Mid-I QP Sets-1

Java qb

Uploaded by

queenchinni13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
19 views1 page

Java Mid-I QP Sets-1

Java qb

Uploaded by

queenchinni13
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

II B.

Tech II Semester MID-I Examinations - December 2021

Subject: Object Oriented Programming through Java Branch: AI & ML


Regulation: R20 Academic Year: 2021-22

SET-1
1. a) What is byte code? (2M)
b) What is an identifier? Write the rules for naming identifiers in Java? (3M)
c) Give a brief note on command line arguments in Java? Also write an example program. (5M)
2. a) What is a Constructor? Demonstrate constructor overloading with the help of a Java program? (5M)
b) What are Nested classes? Explain the types of nested classes in Java? (5M)
3. a) Describe the declaration, initialization and usage of arrays in Java? (5M)
b) Write a Java program to find the sum of elements of an array using for-each loop? (3M)
c) What is Inheritance? List out the uses of inheritance? (2M)
***

SET-2
1. a) Explain the structure of a Java program? Write a simple Java program & illustrate compiling and
running it? (5M)
b) Explain different types of operators in Java? (5M)
2. a) Distinguish between class variables and instance variables? (2M)
b) Demonstrate the significance of ‘this’ keyword in Java? (4M)
c) Write a program to illustrate passing objects as parameters to methods? (4M)
3. a) Write a Java program to search for an array element using Binary Search algorithm? (5M)
b) Develop a Java program to illustrate returning arrays from methods? (5M)
***

SET-3

1. a) Describe various data types supported in Java? (4M)


b) Give short notes on Type casting in Java? (3M)
c) Explain about literals in Java? (3M)
2. a) Delineate method overloading? Write a Java program to implement method overloading? (5M)
b) Elucidate about the importance of static keyword? (5M)
3. a) Discuss transforming arrays as vectors in Java? (5M)
b) Write a Java program that prints the smallest and largest elements of an array? (5M)

***

SET-4

1. a) Explicate the features of Java? (5M)


b) Describe the control statements in Java? (5M)
2. a) What are the possible ways in which multiple values can be returned from a method? Explain. (5M)
b) Discriminate methods and constructors? (3M)
c) Define Constructor chaining? (2M)
3. a) Build a Java program to multiply two given matrices? (5M)
b) Describe arrays of varying length? (5M)
***

You might also like