Skip to content

Commit 38381d5

Browse files
committed
Encapsulation added
Signed-off-by: Someshdiwan <[email protected]>
1 parent ee622ba commit 38381d5

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

Section12Inheritance/src/InheritanceIMP Code Logic Explanation for Interview.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ Your program demonstrates inheritance in Java, specifically:
66
- Method Overriding (different implementations of deposit, withdraw, and repay).
77
- Polymorphism (SavingsAccount and LoanAccount extending Account).
88

9+
Enhanced performance is not a direct benefit of encapsulation in Java.
10+
While encapsulation improves code maintainability, provides better control over data access, and increases modularity,
11+
12+
it doesn't necessarily enhance performance.
13+
14+
Encapsulation is primarily about information hiding and creating a clear separation between the internal implementation
15+
of a class and its public interface, which helps in managing complexity and improving code organization.
16+
917
---
1018

1119
1. Base Class: `Account`

0 commit comments

Comments
 (0)