SEE-3
SEE-3
USN 1 M S
(Autonomous Institute, Affiliated to VTU)
UNIT - I
1. a) Define arrays. How to create and initialize one- dimensional array and CO1 (08)
two-dimension array. Write their syntax and give examples for each.
b) What are different types of data types? List them, write java program to CO1 (08)
demonstrate the different data types.
c) Write a note on String type with an example? CO1 (04)
2. a) Explain any Four Object Oriented Programming concepts with an CO1 (08)
example.
b) Write Java program to demonstrate the usage of Boolean type data. CO1 (06)
c) class Myclass { CO1 (06)
public static void main (String args[]) {
int x;
x = 10;
if(x == 10) {
int y = 20;
System.out.println("x and y: " + x + " " + y);
x = y * 2;
}
y = 100;
System.out.println("x is " + x);
}
}
Discuss the output of the above program.
UNIT - II
3. a) Write different types of loops supported by JAVA. Give their syntax. CO2 (12)
Write java program using for each loop to search the given key element.
b) Along with the syntax and JAVA program explain Java’s short circuit CO2 (08)
operators.
4. a) Write a java program to demonstrate the use of jump statements. CO2 (10)
b) With an example explain the following bitwise operators: |, & , ^ CO2 (05)
c) Write a Java program to check whether given number is palindrome or CO2 (05)
not.
UNIT - III
5. a) Define the keywords ‘static’ and ‘final’, write an example Java program CO3 (08)
using static and final keywords.
b) Define class and object. Write the syntax to create class and object with CO3 (08)
an example. Write complete Java program to illustrate them.
c) Discuss how to hide instance variables of a class. Give example. CO3 (04)
Page 2 of 2
PLC143/PLC243
6. a) Why we need constructors? Can you overload constructors, write CO3 (08)
UNIT- IV
7. a) Write a Java program to implement Multilevel Inheritance concept. CO4 (07)
b) What is an Abstract class? Explain all the cases to implement Abstract CO4 (08)
class.
c) Illustrate with a program to explain Dynamic Method Dispatch. CO4 (05)
UNIT - V
9. a) What is an interface? List the rules to create an interface in Java with CO5 (06)
example.
b) What are packages? How to create them? Mention the different ways of CO5 (06)
accessing them. Give example.
c) What is a Java Exception and its Types? Explain about try, catch, CO5 (08)
statements with examples.
10. a) Why finally block? Write Java to demonstrate the different ways by using CO5 (07)
finally block.
b) Design an interface called Shape with methods draw() and getArea(). CO5 (07)
Further design two classes called Circle and Rectangle that implements
Shape to compute area of respective shapes. Use appropriate methods
to write a Java program.
c) Write a Java program to illustrate the use of multiple catch blocks for a CO5 (06)
try block.
********************************
Page 2 of 2