Batch: 2024
Object Oriented Programming Through Java
MID – 1 Tutorial Questions
UNIT - 1
1)Write and explain the Java program structure with a suitable example and, also discuss the
compilation and execution steps
2)Explain the Java buzz words
3) Explain Java Assignment and Relational Operators with examples
4) Discuss command line arguments in Java with a suitable example.
5) Explain the following Java control statements with examples
i)if else ii) while
6) Explain Ternary operators with examples.
7) Explain the following Java control statements with examples
i)switch ii) for each
8) List and explain Java primitive data types and, also write a program to display default values of all
primitive data types.
9) With suitable examples explain Java break and continue statements.
10) Write a Java program to swap two numbers using bitwise XOR.
11)Explain type casting and type conversion with an exam
UNIT – 2
1) Explain Access Control for Class Members with examples.
2) Explain Java method overloading with a neat example.
3) Explain java.util.Arrays Class methods with example.
4) Discuss Java String class and, also explain any 6 string methods in detail.
5) Explain static keyword with example.
6) Explain how to access Private members of class with example.
7) Define an array. Explain the process of array declaration, reading values, and printing array values
in Java with proper examples
8) Define constructor. Discuss types of constructors in Java with examples
9) Write a program to count the number of objects created for a class using a static variable.
10) Create a class Student with attributes id, name, and marks. Write:
• A default constructor
• A Parametrized Constructor
Create objects using both.
11)Explain this keyword with an example
12)Explain about pass by value and pass by reference with examples
UNIT – 3
1) What is an inheritance? What are the various forms of inheritance? Write a Java program to
demonstrate inheritance.
2) With the help of suitable examples discuss single inheritance in Java.
3)What are the uses of keyword super, explain with an example.
4)Explain about the usage of final keyword with an example.
5)Why java does not support multiple inheritance. Justify your answer.