Java Mid-I QP Sets-1
Java Mid-I QP Sets-1
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
***
SET-4