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

}
}

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are basic data types?

1168


Should you use singleton pattern?

992


What is int lol?

1189


What is Java Reflection API? Why it’s so important to have?

1242


What is the difference between char and char *?

1146


Explain all java features with real time examples

1763


Is a class subclass of itself?

1127


What is bufferedwriter?

1031


Which method cannot be overridden in java?

1043


What is adapter in java?

972


What is regex java?

1167


how does the run() method in runnable work? : Java thread

961


What does singleton mean in java?

1058


What is the use of java?

1012


In the below example, what will be the output?

1082