05 - OOP { Polymorphism_02 (Abstract Class VS Interface & Functional Interface) }{JAVA Arabic}

Channel:
Subscribers:
10,800
Published on ● Video Link: https://www.youtube.com/watch?v=2oichHqI39U



Duration: 21:41
102 views
5


ماهو الفرق بين الـ Abstract Class VS Interface
ماهو الفرق بين الـ Functional Interface & Interface
ماذا تعنى كلمه Abstraction بلغات البرمجه
متى يفضل استختدام الـ Abstract Class أو الـ Interface ولماذا

what is abstraction means? 03:35
======================================================
Abstract Classes Compared to Interfaces
--------------------------------------------------------------------
Abstract classes are similar to interfaces. You cannot instantiate them, and they may contain a mix of methods declared with or without an implementation. However, with abstract classes, you can declare fields that are not static and final, and define public, protected, and private concrete methods. With interfaces, all fields are automatically public, static, and final, and all methods that you declare or define (as default methods) are public. In addition, you can extend only one class, whether or not it is abstract, whereas you can implement any number of interfaces.
================================================
Which should you use, abstract classes or interfaces?
----------------------------------------------------------------------------------------
Consider using abstract classes if any of these statements apply to your situation:
- You want to share code among several closely related classes.
- You expect that classes that extend your abstract class have many common methods or fields, or require access modifiers other than public (such as protected and private).
- You want to declare non-static or non-final fields. This enables you to define - methods that can access and modify the state of the object to which they belong.
- Consider using interfaces if any of these statements apply to your situation:
- You expect that unrelated classes would implement your interface. For example, the interfaces Comparable and Cloneable are implemented by many unrelated classes.
- You want to specify the behavior of a particular data type, but not concerned about who implements its behavior.
- You want to take advantage of multiple inheritance of type.
====================================================
Oracle Article:
-----------------------
https://docs.oracle.com/javase/tutorial/java/IandI/abstract.html#:~:text=An%20abstract%20class%20is%20a,but%20they%20can%20be%20subclassed.&text=When%20an%20abstract%20class%20is,methods%20in%20its%20parent%20class.




Other Videos By Status Code


2020-08-0804 - JSP (Implicit Objects - Expression Language - Error Page) {Arabic - بالعربي}
2020-08-0703 - JSP (Life Cycle-Scriptlet-Expression-Declaration-Directive) {Arabic - بالعربي}
2020-08-0602 - Servlet ( forward-include-redirect ) {Arabic - بالعربي}
2020-08-0501 - Servlet hierarchy classes {Arabic - بالعربي}
2020-08-0401 -Tomcat Server {Arabic}(Intro [Architecture, Components, Life Cycle, etc ]) كيف يعمل تومكات سيرفر
2020-08-0105 - {Web Technology} (Arabic) Anatomy of a URL
2020-07-3004 - {Web Technology} (Arabic) HTTP Methods Intro
2020-07-2903 - {Web Technology} (Arabic) Request-Response Intro
2020-07-2902 - {Arabic} كيف يعمل الانترنت What is web server, web application, how internet works
2020-07-2414 - CarRental Project {Arabic JAVA} { Finishing Service Layer} -- مشروع مكتب تأجير سيارات بالجافا
2020-07-2405 - OOP { Polymorphism_02 (Abstract Class VS Interface & Functional Interface) }{JAVA Arabic}
2020-07-2304 - Object Oriented Programming OOP { Polymorphism 01 Method Override & Method Overload }{Arabic}
2020-07-2201 - Object Oriented Programming (OOP) { Classes & Object } {Arabic}
2020-07-1913 - CarRental Project {Arabic JAVA} {Adding Exception & Factory to DAO, Explain Access Modifier}
2020-07-1812 - CarRental Project {Arabic JAVA} {DRY_02, UPDATE, DELETE, INSERT} - مشروع مكتب تأجير سيارات جافا
2020-07-1811 - CarRental Project {Arabic JAVA}{DRY, Row Mapper, Data Casting Postgres} - مشروع مكتب تأجير جافا
2020-07-1710 - CarRental Project {Arabic JAVA} {CRUD Junit Test, Flyway & Postgres} - مشروع مكتب تأجير بالجافا
2020-07-1609 - CarRental Project {Arabic JAVA} {JDBC CRUD, STvsPS} - مشروع مكتب تأجير بالجافا
2020-07-1408 - CarRental Project {Arabic JAVA} {Preparing connection to DB} - مشروع مكتب تأجير بالجافا
2020-07-1307-CarRental Project {Arabic JAVA} {USING log4j & Reading Properties File}- مشروع مكتب تأجير بالجافا
2020-07-1206 - CarRental Project {Arabic JAVA} {SQL Script (part 02) Data} - مشروع مكتب تأجير سيارات بالجافا



Tags:
abstract class
interface
functional interface
object
class
instance variable
class variable
object oriented programming
oop
java
programming language
arabic java
private
public
protected
default access
access modifier
final keyword
static keyword
global variable
local variable
belongs to
class level
only once
one copy
jvm
overload
override
compile time polymorphism
Runtime polymorphism
method override
method overload