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

Can we use different return types for methods when overridden?

554


Can you call a method in a method?

529


Does java initialize arrays to zero?

506


What is Java Package and which package is imported by default?

593


How do you sing an Applet ?

2030






Why static functions are used?

568


Explain the difference between collection api and stream api in java8?

509


What does the string method compareto () do?

538


What are the difference between composition and inheritance in java?

512


How do singleton patterns work?

516


Why do we need array in java?

533


What are the Main functions of Java?

625


How to solve the problem of generating the unique hash keys with hash function?

1458


What are the benefits of operations?

511


Can you sort a string in java?

489