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


Please Help Members By Posting Answers For Below Questions

Why array is used in java?

724


Can I uninstall java?

812


Explain wrapper classes in java?

770


What is variable and rules of variable?

764


Are maps ordered java?

719


What does || || mean in math?

712


What is the definition of tree ?

769


How can you read content from file in java?

811


What is java dot?

711


What is the purpose of using bufferedinputstream and bufferedoutputstream classes?

822


How to make a read-only class in java?

826


What is an error in java?

872


What is the final access modifier in java?

827


Is integer immutable in java?

754


Is arraylist zero based?

782