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

There are 2 methods in a class. Both have the same method
signature except for return types. Is this overloading or
overriding or what is it?

Answer Posted / shamsherabanu

It is not overloading because overloading must have different parameters, no matter what ever may be the return type is.
And for overriding inheritance should be used between 2 classes.
so it is neither overriding nor overloading.

It just show compilation error as method is already defined in
same class

Is This Answer Correct ?    12 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the purpose of javac exe?

1146


Why parameters should be passed by reference?

1004


Does treeset use compareto?

1021


How do you implement singleton class?

1035


What are the states of thread in java?

1033


What are the disadvantages of using inner classes?

1274


how to create multithreaded program? Explain different ways of using thread? When a thread is created and started, what is its initial state? : Java thread

1064


What is basic syntax?

1103


What is var keyword ?

1232


What is the tradeoff between using an unordered array versus an ordered array?

1287


What is the role of the java.rmi.naming class?

1137


When does a class need a virtual destructor?

1065


What is the purpose of the system class in java?

1094


Suppose if we have variable ' I ' in run method, if I can create one or more thread each thread will occupy a separate copy or same variable will be shared?

1118


Explain the difference between abstraction and encapsulation.

1027