In this video, I explained and showed How to use and when to use interface in java program. With Real-time Examples. In this video, I Explained how to achieve abstraction using interfaces. And How to achieve multiple inheritance in java using interfaces. And difference between abstract and interfaces in java, which one we need to use in real-time. And major changes in the interface in java 1.8 and 1.9 version onward.
Check more details about abstract class & abstract methods: • 🔴Abstraction in java | abstract class and ...
Eclipse Download & Install: • 🔴Eclipse for Java Developers | Download Ec...
Java Download & Install: • 🔴☕How to download and install JDK java in...
OOPS in JAVA: • 🔴🔥OOPS in java ||what is class in java || ...
Methods in JAVA: • Oops in java | what is methods in java | s...
Constructors in java: • Oops in java | constructors in java | what...
this keyword in java: • 🔴this keyword in java | this keyword in j...
inheritance(IS-A) in java: • 🔴Inheritance in java | Types of Inheritanc...
Association(HAS-A) in java: • 🔴Association(HAS-A) in Java | What is Aggr...
Polymorphism in java(Compile time/overloading): • Polymorphism in java | Compile time Polymo...
Polymorphism in java(Runtime time/overriding) • 🔴polymorphism in java | Run time polymorph...
super keyword in java: • super keyword in java | uses of super keyw...
Abstraction in java: • 🔴Abstraction in java | abstract class and ...
interface in java: • 🔴interface in java | Multiple Inheritance...
Access Modifiers in java: • 🔴Access Modifiers in java | Modifiers in j...
Encapsulation in java: • 🔴🔥Encapsulation in java | Rules to achieve...
Topics Covered
=============
0:00 introduction
01:00 ways to achieve abstraction in java
03:30 interface creation in java
10:40 interface creation in Eclipse
12:00 Relationship between classes and interface
12:30 implements keyword in java
15:00 can we create object for an interface ?
18:00 Relationship b/w interfaces
21:00 How to achieve multiple inheritance using interfaces
28:00 abstract class
30:00 Relationship between classes and interface with diagram
33:00 variables in an interface
37:00 constructors in an interface?
38:00 java 8 features in an interface
41:00 why static and default methods in an interface
46:00 java 9 features in an interface
47:00 why we can't achieve 100% abstraction
49:00 Tag or markable interface
53:00 Runnable interface in java
Abstraction in java
-------------------
Abstraction is a process of hiding the implementation details
and showing only functionality to the user
Abstraction is a process where you show only “relevant”
data and “hide” unnecessary details of an object from the user.
Ex:- TV Remote, Car
why & Usage :- Security
Interface in Java
-----------------
The interface looks like a class but it is not a class.
Defining a Contract means to create an Interface.
The class that implements the interface must implement all the methods of that interface.
Also, the java programming language does not allow you to extend more than one class,
However, you can implement more than one interface in your class.
An interface can not implement another interface.
It has to extend the other interface
Tag or Marker interface in Java
After Java 8, Interface definition changes a lot
Key points:
--------
1) We can’t instantiate an interface in java.
That means we cannot create the object of an interface
2) The interface provides full abstraction as none of its methods have a body(1.7).
On the other hand, the abstract class provides partial abstraction as it can have
abstract and concrete(methods with the body) methods both.
An interface is 100% abstract class(Implicitly). After Java 8 it doesn’t hold true.
3) implements keyword is used by classes to implement an interface.
4) While providing implementation in a class of any method of an interface,
it needs to be mentioned as public.
5) The class that implements an interface must implement all the methods of that interface,
else the class should be declared abstract.
6) All the interface methods are by default abstract and public.
7) Variables declared in the interface are public, static, and final by default.
8) Interface variables must be initialized at the time of declaration otherwise compiler will throw an error.
Java 8 introduces a concept of the Default Method. Now an Interface can contain a Method
body if it is not abstract. A method inside Interface can contain either “abstract”, “static” or “default” modifier.
Tags:
The java programming language in Telugu,
java programs in Telugu Explanation,
Free java Telugu course,
Java in Telugu,
java in Telugu PDF,
java in the Telugu language,
java tutorial in Telugu,
learn java in Telugu,
java in Telugu for beginners,
compile-time polymorphism,
Static Polymorphism,
Runtime polymorphism,
Dynamic Method Dispatch,
Polymorphism in java,
What is Polymorphism in java,
Types of Polymorphism in java,
Attach JDK source in Eclipse,
source not found in eclipse,
interface in java,
abstract vs interface,
core java in Telugu.