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...

How to call the m1() method of Base class in below snippet ?


class Base
{
public void m1()
{
System.out.println("Base m1 ");
}

public void m2()
{
System.out.println("Base m1 ");
}
}

======================


class Derived extends Base
{
public void m1()
{
System.out.println("Derived m1");
}
public void m3()
{
System.out.println("Derived m3");
}

public static void main(String[] args)
{
Base ob=new Derived();
ob.m1();
//System.out.println("Hello
World!"+ob.m1());
}
}

Answer Posted / suma.k

in main method

Base b1=new Base ();
b1.m1();

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the considerations to be made in case of loops in java ?

1084


What is an algorithm in java collection framework? : java collections

1108


How do I find jre path in windows?

1072


What is the Spring2.5 MVC Navigation flow?

6478


What is java collection? : java collections

1175


What do you understand by synchronization? Why is it important?

1111


What is the use of the list interface in the java collection? : java collections

1076


What are the differences between the java collection and the java list? : java collections

1169


What are the interfaces in java collections? : java collections

1209


What is the enumerator of the java collection framework? : java collections

1090


What are the main classes of the list interfaces? : java collections

1078


what is mean by hasing and maping in java platform and advantage?

2443


Hi frnds how to lock an user when he enter wrong credentials more than 3 time using java or j2ee tech take username and password in a bean no need to connect DB and validate give me some sample application code or links its urgent for me thanks in advance

2399


What are the different types of classes implemented in the set interfaces? : java collections

1107


What is deque in the java collections framework? : java collections

1113