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

What is the importance of finally block in exception handling?

778


What is gc()?

748


What is exception in java?

753


What is internal variable?

734


What are the differences between Java 1.0 and Java 2.0?

1900


How do you read a char in java?

705


What is the use of generics? When was it added to the Java development Kit?

763


How to change value in arraylist java?

746


how to know the total memory occupied by the objects in the ArrayList(Array list may contain duplicate objects)

2114


What one should take care of, while serializing the object?

670


What is JDBC Driver interface?How can you retrieve data from the ResultSet

1775


What is argument in java?

764


Explain the importance of finally block in java?

742


what is meant by HQL?

835


Is it possible to specify multiple jndi names when deploying an ejb?

766