#6.8 Java Tutorial | Abstract Keyword

  Рет қаралды 80,740

Telusko

Telusko

6 жыл бұрын

We can instantiate the abstract class which means we can not create an object of an abstract class.
- We can use abstract keyword with both abstract method and abstract class.
- We can do both define or declare an object.
- When you want to declare a method in an abstract class, you can create the abstract method in it as:
public abstract void eat();
- Whenever you create an abstract method then it is compulsory to write an abstract keyword with it.
- We create an abstract method only when we do not want to define that method at the time.
- Whenever you create an abstract method then that class should be abstract otherwise it will give you an error.
- If a class extends an abstract class then it is compulsory to define the method in it as well for which you are creating an object.
e.g., Human obj=new Man();
- Here, Human is a reference of an abstract class, and an object of Man class is created that is a main class and not an abstract class but extending an abstract class Human.
Human :- abstract class
Man :- non-abstract class ( Concrete class)
In this video we will see:
- What is an abstract keyword?
- Abstract method and abstract class
- How to define an abstract method?
- Properties of an abstract class and an abstract method
- How to create an object of an abstract class?
Instagram : / navinreddyofficial
Linkedin : / navinreddy20
Discord : / discord
More Learning :
Java - bit.ly/3xleOA2
Python :- bit.ly/3H0DYHx
Django :- bit.ly/3awMaD8
Spring Boot :- bit.ly/3aucCgB
Spring Framework :- bit.ly/3GRfxwe
Servlet & JSP :- bit.ly/3mh5CGz
Hibernate Tutorial :- bit.ly/3NWAKah
Rest API | Web Service Tutorial :- bit.ly/38RJCiy
Git :- bit.ly/3NUHB3V
JavaScript :- bit.ly/3mkcFys
Kotlin :- bit.ly/3GR2DOG
Donation:
PayPal Id : navinreddy20
Patreon : navinreddy20
www.telusko.com/contactus

Пікірлер: 20
@vladanulardzic5859
@vladanulardzic5859 4 жыл бұрын
Easy to understand. Very nice practical explanation. You did just right and straight in to the point. Thank you. Keep on...
@rakshitks7850
@rakshitks7850 6 жыл бұрын
Naveen sir you are just awesommeeeeeeeeeeeeeeeeee
@shubhamshukla7645
@shubhamshukla7645 5 жыл бұрын
You're a wonderful person
@josmeldiaz21
@josmeldiaz21 6 жыл бұрын
Very helpful ur videos man.
@hoomanrs3804
@hoomanrs3804 4 жыл бұрын
very good explanation👍
@ansakashifkhilji926
@ansakashifkhilji926 4 жыл бұрын
Sir u are an actuall alien teacher
@amanshukla1156
@amanshukla1156 5 жыл бұрын
It is showing an error when we create the reference of Human and object of man like- Variable obj of type Human not in the case of when we create object and reference both of Man
@anandchauhan1225
@anandchauhan1225 6 жыл бұрын
Thanks naveen sir
@papachoudhary5482
@papachoudhary5482 6 жыл бұрын
Thanks! Sir
@dhevanrajandran7632
@dhevanrajandran7632 4 жыл бұрын
Good Job :)
@rahulgoti3864
@rahulgoti3864 6 жыл бұрын
Thank You
@siyedyoussef3202
@siyedyoussef3202 6 жыл бұрын
thanks sir
@lastwish6428
@lastwish6428 Жыл бұрын
is Abstract and Abstraction both different ? or Same ?
@yashchachad
@yashchachad 5 жыл бұрын
Awesome vidoes but please use dark ide for explaination!!
@ArkoSarkar1
@ArkoSarkar1 6 жыл бұрын
If ear is abstract method, and then the class becomes abstract, then are all the methods now inside this class abstract or not? Hence is walk() abstract? Also can any method be defined inside an abstract class?
@rlakshmi2235
@rlakshmi2235 5 жыл бұрын
Here walk() method is not abstract. If any class have abstract method, then that class should be Abstract class. It is not compulsory to have all methods inside abstract class should be Abstract method. we can also have other methods inside abstract class.
@amanshukla1156
@amanshukla1156 5 жыл бұрын
A abstract class may or may not have abstract method. check it yourself u will find your solution
@teluskosupport1
@teluskosupport1 Жыл бұрын
Actually when you make a class abstract then you have power to make abstraction from 0 to 100% means in this class you can make any number of abstract method by using abstract keyword and you can also make any number of non abstract method.
@robinpatel7762
@robinpatel7762 6 жыл бұрын
What the usefulness of abstract keyword i dont understand
@teluskosupport1
@teluskosupport1 Жыл бұрын
suppose you want to use some method in every class for that you can do two thing either implement or extends class whcich contain that abstract method so that it become necessary to implement that class on child class.
#6.9 Java Tutorial | Why do we need Abstract Class?
4:56
Telusko
Рет қаралды 117 М.
Summer shower by Secret Vlog
00:17
Secret Vlog
Рет қаралды 12 МЛН
MISS CIRCLE STUDENTS BULLY ME!
00:12
Andreas Eskander
Рет қаралды 18 МЛН
Abstract Class In Java Tutorial #79
8:55
Alex Lee
Рет қаралды 537 М.
Functional Interface | Lambda Expression in Java
13:56
Telusko
Рет қаралды 142 М.
ASMR Programming - Spinning Cube - No Talking
20:45
Servet Gulnaroglu
Рет қаралды 3,8 МЛН
#65 What is Interface in Java
8:03
Telusko
Рет қаралды 180 М.
Super Keyword in Java Full Tutorial - How to Use "super"
11:33
Coding with John
Рет қаралды 199 М.
#8.2 Java Tutorial | Access Modifiers
10:32
Telusko
Рет қаралды 54 М.
Abstract Classes and Methods in Java Explained in 7 Minutes
7:00
Coding with John
Рет қаралды 496 М.
the TRUTH about C++ (is it worth your time?)
3:17
Low Level Learning
Рет қаралды 655 М.
USAGE OF THIS KEYWORD - JAVA PROGRAMMING
11:12
Sundeep Saradhi Kanthety
Рет қаралды 102 М.
Kumanda İle Bilgisayarı Yönetmek #shorts
0:29
Osman Kabadayı
Рет қаралды 2,2 МЛН
My iPhone 15 pro max 😱🫣😂
0:21
Nadir Show
Рет қаралды 715 М.
Как удвоить напряжение? #электроника #умножитель
1:00
Hi Dev! – Электроника
Рет қаралды 1,1 МЛН
S24 Ultra and IPhone 14 Pro Max telephoto shooting comparison #shorts
0:15
Photographer Army
Рет қаралды 10 МЛН