0% found this document useful (0 votes)
2 views2 pages

OOP Java Question Paper Solved

The document covers key concepts of Object Oriented Programming using Java, including the use of the 'this' keyword, array declaration, and the differences between final and super keywords. It also explains method overloading versus overriding, the garbage collector, and the distinction between early and late binding. Additionally, it outlines the advantages of OOP and describes an Employee Tax Program with an abstract class and its subclasses.

Uploaded by

Niaz Ali
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)
2 views2 pages

OOP Java Question Paper Solved

The document covers key concepts of Object Oriented Programming using Java, including the use of the 'this' keyword, array declaration, and the differences between final and super keywords. It also explains method overloading versus overriding, the garbage collector, and the distinction between early and late binding. Additionally, it outlines the advantages of OOP and describes an Employee Tax Program with an abstract class and its subclasses.

Uploaded by

Niaz Ali
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

Object Oriented Programming Using JAVA (IT-406)

SECTION I – Short Questions

Q1. Use of this keyword:

The this keyword refers to the current object of a class. It is used to differentiate instance variables
from local variables.

Q2. Java statement for array of size 20:

int[] arr = new int[20];

Q3. Use of final and super:

final prevents modification. super refers to parent class members.

Q4. Compile and run commands:

javac [Link]

java MyProgram

Q5. Why Java is secure:

No pointers, JVM sandbox, automatic garbage collection.

Q6. Method Overloading vs Overriding:

Overloading occurs in same class; overriding requires inheritance.

Q7. is-a vs has-a:

is-a uses inheritance; has-a uses association.

Q8. Garbage Collector:

Automatically removes unused objects from memory.

Q9. Abstract Method Rule:

Class must be abstract if it contains abstract method.

Q10. Early vs Late Binding:


Early binding is compile time; late binding is runtime.

SECTION II – Long Questions

Advantages of OOP:

Reusability, security, maintainability.

Employee Tax Program (Java):

Abstract class Employee with subclasses Manager (10%), Programmer (15%), Teacher (20%).

You might also like