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
Which is faster call by value or call by reference?
please send me hr interview questions in it industry
Can a class have multiple constructors?
How do I get the | symbol on my keyboard?
Why main method is called first in java?
Does java arraylist maintain insertion order?
What initialize variables?
What is java argument list?
Where are global variables stored?
What are the Class Libraries ?
Under what conditions is an object’s finalize() method invoked by the garbage collector?
What are the parts of a method?
What is canonical name in java?
Can we clone singleton object?
Can we write class inside a class in java?