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

Class c implements interface I containing method m1 and m2 declarations. Class c has provided implementation for method m2. Can I create an object of class c?

1612


What is a map? What are the implementations of map?

1090


How to print an arraylist in java?

1073


How to check if linked list contains loop in java?

898


What is string [] java?

947


Difference between static and dynamic class loading.

1122


Explain method overloading?

1015


Can you make a constructor final in Java?

1128


Why for each loop is used?

1011


What are the differences between abstract class and interface?

1069


What 4 doubled?

981


How many types of interfaces are there?

1060


What are the data types supported by java? What is autoboxing and unboxing?

1016


What is merge sort in java?

971


What is the difference between the paint() and repaint() methods?

1062