
- Forum
- Programming Talk
- Java
- Abstract classes
Abstract classes
This is a discussion on Abstract classes within the Java forums, part of the Programming Talk category; ya, we can call the concrete methods by class name as jazzsona said if that method is declared as static ...
-
10-21-2010, 02:31 PM #11
- Join Date
- Oct 2010
- Answers
- 1
ya, we can call the concrete methods by class name as jazzsona said if that method is declared as static even without object.
Thanks
-
10-23-2010, 12:57 AM #12
- Join Date
- Oct 2010
- Answers
- 1
-
-
02-15-2011, 01:40 AM #14
- Join Date
- Feb 2011
- Location
- Bangalore
- Answers
- 3
Yes we can call concrete method of a abstract class without inheriting but method should be declared as static. If its not declared as static then abstract class should be extended by derived class, then u can call concrete method.
For Example:
abstract class display
{
static void display()
{
System.out.println("Calling Concreate method");
}
}
public class AbstractMethodCalling {
public static void main(String args[])
{
display.display();
}
}
OUTPUT:
Calling Concreate method
-
Sponsored Ads

Reply With Quote






