0% found this document useful (0 votes)
10 views3 pages

JAVA-Theory Aporna

Uploaded by

Lakad Chowdhury
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)
10 views3 pages

JAVA-Theory Aporna

Uploaded by

Lakad Chowdhury
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/ 3

1. Abstraction application (partial and 100% abstraction) in java.

Ans:
Partial Abstraction (using abstract classes)
● An abstract class in Java is used to achieve partial abstraction, meaning it can
have both abstract methods (without implementation) and concrete methods
(with implementation).
● You cannot instantiate an abstract class directly, but you can inherit it and provide
implementations for its abstract methods.

100% Abstraction (using interfaces)


● An interface in Java provides 100% abstraction, as it can only have abstract
methods (until Java 8). From Java 8 onwards, interfaces can have default and
static methods, but the core concept remains.
● All methods in an interface are implicitly public and abstract.

2. Difference between interface and abstract in java.


Ans:

Interface:

Abstract:

3.Static, Super and Final keywords in java with examples.


Ans:
Static:
● Purpose: Indicates that a member belongs to the class, not instances.
Super:
● Purpose: Refers to the superclass, used to call its methods or constructors.

Final:
● Purpose: Makes variables constant, prevents method overriding, and stops class
inheritance.

You might also like