Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

}
}

Answers were Sorted based on User's Feedback



abstract class Demo { public void show() { System.out.println("Hello I am In show met..

Answer / kuldeep

public class Test extends Demo {
public static void main(String[] args) {
Demo obj=new newQuestion();
obj.show();


}
//use this code in the main it will call the base method

Is This Answer Correct ?    5 Yes 2 No

abstract class Demo { public void show() { System.out.println("Hello I am In show met..

Answer / 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

abstract class Demo { public void show() { System.out.println("Hello I am In show met..

Answer / kapilpahujamca

I TELL THEM IT IS NOT POSSIBLE TO CALL THE BASE METHOD AND I
ALSO REPLY THAT JAVA DOES NOT SUPPORT :: OPEARTOR IT IS
IMMPOSSIBLE

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More Core Java Interview Questions

When should I use a singleton?

0 Answers  


Write a function to print Fibonacci series and Tribonacci series?

0 Answers   Hexaware,


What is skeleton and stub? What is the purpose of those?

0 Answers  


How many bits is size_t?

0 Answers  


What is type safety in java?

0 Answers  


Can a for statement loop indefinitely?

3 Answers  


What are annotations in java?

0 Answers   Impetus,


What are different types of access modifiers?

3 Answers  


What is balanced tree in java?

0 Answers  


What does a boolean method return?

0 Answers  


Where is the singleton class used?

0 Answers   Cap Gemini,


what is the role of xml in core java?? and how we can use it?? can somebody give a sample program with explanation and from where i can read more about xml?????

0 Answers   HCL, SAP Labs, Vital Soft,


Categories