Java Interface | Java tutorials for beginners смотреть онлайн
Java Interface | Java tutorials for beginners
About this Video:
This video will explain basics of Java interface with real life example as well as practical example.
Links:
To learn about basics of Java click here ?
Java Basics: https://www.youtube.com/playlist?list=PLTSNjybYuOXsW0aRk4iI54ncim2qe3rJb
Java Abstraction:
https://youtu.be/gJ_g8GVUORk
Method Overriding:
https://youtu.be/FAOKRt9ELAY
Notes:
1) What is Interface?
2) Uses of Interface.
3) Syntax
4) Achive abstraction by interface.
1) What is Interface?
First, let's understand in real life scenario,
Suppose,you have to make a wooden chair by the help of carpenter.
So for that, first,you will need to give details about chair or we can say specifications about chair to the carpenter and specifications such as suppose,
designOfChair();
sizedOfChair() ;
applyColor();
And using this specifications carpenter will make a chair as per your requirement
I .e carpenter will use or implement all these specifications while making chair..
So, these are the Requirement specification
And these Requirement specifications we can called an interface..
So if we think technically,
Here, you are a client demanding for wooden chair and carpenter will be a service provider who providing service by implementing all these specifications to make a chair as per your requirement..
so here we can say ,
this interface is work like an agreement or contract
between you and carpenter
I.e between client and service provider..
So basically,
Interface can be define as : Any agreement or contract between client and service provider.
2) Uses of Interface:
i)Interface is used to achieve total abstraction.
ii)Interface is used to achieve multiple inheritance.
iii)Interface is used to achieve Loose coupling.
3) Syntax:
interface Interface Name
{
// constant fields;
// abstract methods;
(features added under
? Java version 8)
// default methods ;
// static methods;
(features added under
?Java version 9)
//private methods;
// private static methods;
}
4) Achive abstraction by interface:
interface User{
void insertCard();
void enterPin();
}
class Test1 implements User {
public void insertCard(){
System.out.println("Please insert card.");
}
public void enterPin(){
System.out.println("Please enter a pin.");
}
}
class Test {
public static void main(String [ ] args){
Test1 test1Obj = new Test1();
test1Obj.insertCard();
test1Obj.enterPin();
}
Output:
Please insert card.
Please enter a pin.
#javainterface #interfaceinjava #javainterfacewithnotes #sgturorial #javainterfacewithreallifeexample #javainterfacewithexample #javainterfacenewfeatures
Что делает видео по-настоящему запоминающимся? Наверное, та самая атмосфера, которая заставляет забыть о времени. Когда вы заходите на RUVIDEO, чтобы посмотреть онлайн «Java Interface | Java tutorials for beginners» бесплатно и без регистрации, вы рассчитываете на нечто большее, чем просто загрузку плеера. И мы это понимаем. Контент такого уровня заслуживает того, чтобы его смотрели в HD 1080, без дрожания картинки и бесконечного буферизации.
Честно говоря, Rutube сегодня — это кладезь уникальных находок, которые часто теряются в общем шуме. Мы же вытаскиваем на поверхность самое интересное. Будь то динамичный экшн, глубокий разбор темы от любимого автора или просто уютное видео для настроения — всё это доступно здесь бесплатно и без лишних формальностей. Никаких «заполните анкету, чтобы продолжить». Только вы, ваш экран и качественный поток.
Если вас зацепило это видео, не забудьте взглянуть на похожие материалы в блоке справа. Мы откалибровали наши алгоритмы так, чтобы они подбирали контент не просто «по тегам», а по настроению и смыслу. Ведь в конечном итоге, онлайн-кинотеатр — это не склад файлов, а место, где каждый вечер можно найти свою историю. Приятного вам отдыха на RUVIDEO!
Видео взято из открытых источников Rutube. Если вы правообладатель, обратитесь к первоисточнику.