Java Abstraction | Java tutorials for beginners

preview_player
Показать описание
Java Abstraction | Java tutorials for beginners
About Video:
This video will show basics of abstraction with real life example as well as pratical example.

To learn about basics of Java click here 👇

Notes:
1. What is Abstraction?
2. Purpose of Abstraction.
3. Advantages
4. Achieve Abstraction using Abstract class.
1.What is Abstraction?
Nowadays,most of us carry very little amount in hand
because we can easily withdraw cash from ATM
and we know that How to use ATM machine?Where to insert ATM card?and Where to enter pin? and Where we can take money?basically we know, how to use atm machine but we don't know How ATM machine work internally?
This means, after inserting card How card details verified ?or When we entered pin then How pin is linked with your bank account?
So How all these things work internally, we don't know,
So basically,here internal working or we can say background details are hidden from users
And shows only essential information to the users that are necessary for users to use ATM machine and this concept is nothing but the abstraction so basically,
Abstraction is the concept of showing only the essential information to the users and hiding background details or implementation from the users.
2.Purpose of Abstraction:
Abstraction Helps to increase the security of an application or program as only showing essential details to the user
This means,
Security is the main purpose of Abstraction.
3.Advantages:
1.It provide security to the application or program.
2.Enhancement.(To know about Enhancement,you can watch the video, everything I have explained there.)
3.It reduces the complexity by hiding unnecessary details and only showing necessary details to the user.
4. Achieve Abstraction using Abstract class :
Let's assume that, you are creating program for ATM Machine.
//Abstract class
abstract class User{
// Abstract method
abstract void insertCard();
// Non-abstract method
void displayMsg() {
}
}
class Test1 extends User{
void insertCard(){
}
}
class Test{
public static void main(String[] args){
Test1 test1 = new Test1();
}
}
Output:
Welcome User
Please,insert card
In the above example,there is one User class which is abstract and inside User class there is one insert card() method which is abstract and in tha same class there is one non abstract method also and it's displayMsg() which has its body/ implementation whereas abstract method doesn't has it's implementation and also create Test1 class which extends abstract class i.e User class and provide implementation for abstract method of User class and create one more class and it's Test class to put all executable code and create object of Test1 class and call the methods of abstract class to get desired output ( To understand more clearly please watch video completely)
-------------------------------------------------------------------------------------------------------------------
Thank you so much🙏

#abstractuoninjava #javaabstraction #abstractclassinjava #javaabatractclass#abstractmethodinjava #javaabstractmethod #sgtutorial #javawithnotes #javanotes #oopsabstraction
#useofabstraction #javaabstractionexample
#javaabstractiontutorial #javaabstractionwithexample
Рекомендации по теме
Комментарии
Автор

Mem please more videos ur video all concepts good

Abhishek-dftf
Автор

Im subscribin!!! If I was you I would employ 'promosm'!!!

edgarsims