+ 1
What is the benefit of abstract class?
2 Antworten
+ 3
For understanding the concept of abstract method Lets take an example of Birds . Now all type of Birds share some common properties(sleeping,eating,walking) but they use these properties in different -different manner.Now the next question arises how? How they use these common properties in different manners ? Lets take our first property i.e sleeping, now some of the bird sleeps at day time like an owl but many of them sleeps at night so this how they are using this behavior in different -2 manner. When the same functionality is find in many objects we declare that behavior as abstract method i.e with no implementation so that a class extending an abstract class can provide its own implementation for those functionalities.
0
Guys i have this kind of confusion in java programming. so guys can anyone else briefly explain indexOf() methond in java.