How Method returns instance of Interface in Java?

preview_player
Показать описание
In this video we will see
- How a method returns an instance of an Interface
- An example of JDBC
- Example in java explaining how method return object of interface

An interface is an abstract type that is used to specify a behaviour that classes must implement.
Interfaces are declared using the interface keyword, and may only contain method signature and variable declarations that are declared to be both static and final.
All methods of an Interface do not contain implementation (method bodies) as of all versions below Java 8.
Starting with Java 8, default and static methods may have implementation in the interface definition.

Interfaces cannot be instantiated, but rather are implemented.
A class that implements an interface must implement all of the non-default methods described in the interface, or be an abstract class.

Editing Monitors :

Follow on Facebook:

Subscribe to our other channel:
Telusko Hindi :

Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
Рекомендации по теме
Комментарии
Автор

the question really pissed me off, thanks for clearing the concept.

amritpalbadhan
Автор

The exact content I was searching for..! 😊

snehalrj
Автор

This question was bugging me a lot since I encountered it at iterator.Thanks for making it clear!

The_Ashwatthama
Автор

For 10 days this thing i was not able to digest ; today i was able to tnx

pratikkhairnar
Автор

Few days before the same question came to my mind and you cleared it today. I'm glad that I'm your follower. Thank you.

ElizaSethi
Автор

Few days ago I read a stackoverflow post which was on same concept as this video.... but you explained it even better.

mr.r
Автор

Basics of JavaScript and Node.js, please for android push notification as soon as possible. Really helpful video sir. Thanks for uploading.

bhaskarjyotidutta
Автор

this example help a lot to solve my doubts in my mind moreover example seems realistic

thecrazyunboxing
Автор

can you explain why we do
Configuration con=

are we using 2 methods dor initializing here

_hetpatel
Автор

Wow, thank you sir. Mystery inside my head solved 😀

erdeepakkumar
Автор

I'm not sure if I did understand what you're describing, but for me its simply the same like:

SomeInterface si = new

Or am I wrong??

Thx for clarifying

tomaspyth
Автор

does driver manager class implements connection interface

johnsumith
Автор

Sir when do we use new keyword in return statement in java

srinivasg
Автор

Great video. Please specify that the call would be on the Samsung class and the call is dependent on the implementation class type.

MuhammedMahmoodAlam
Автор

Where are more likes than Views!!
I never saw this.

dildarsk
join shbcf.ru