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

How to perform quicksort in java?

1123


What is java basic concept?

1053


How destructors are defined in java?

1197


What are the advantages of assembly language?

936


difference between byte stream class and character stream class?

4562


What is java english?

1009


Can we extend singleton class?

957


What are the different types of multitasking?

1110


What is the significance of listiterator?

1102


What is return used for in java?

1031


What are the access modifiers in java?

1042


What are the benefits of immutable objects?

1013


What is ph and buffers?

1007


What are runtime exceptions?

1166


What is the purpose of void?

996