abstract class Demo {
public void show()
{
System.out.println("Hello I am In show method of Abstract
class");
}
}
class Sample extends Demo
{
public void show()
{ super.show();
System.out.println("Hello I am In Sample ");
}
}
public class Test
{
public static void main(String[] args) {
//I WANT TO CALL THE METHOD OF BASE CLASS IT IS POSSIBLE OR NOT
CAN WE USE SCOPE RESOLUTION OPERATOR TO CALL OR JAVA NOT
SUPPORTED THAT :: OPERATORE
}
}
Answer Posted / sathiya
We cant call the base class since we cant create object for
abstract class(base class is a abstract class).
And java does not support the scope resoultion operator to
call a class.
Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Can we use different return types for methods when overridden?
Can you call a method in a method?
Does java initialize arrays to zero?
What is Java Package and which package is imported by default?
How do you sing an Applet ?
Why static functions are used?
Explain the difference between collection api and stream api in java8?
What does the string method compareto () do?
What are the difference between composition and inheritance in java?
How do singleton patterns work?
Why do we need array in java?
What are the Main functions of Java?
How to solve the problem of generating the unique hash keys with hash function?
What are the benefits of operations?
Can you sort a string in java?