A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Refactoring for Software Design Smells: Managing Technical Debt
this week in the
OO, Patterns, UML and Refactoring
Joined: Oct 13, 2007
Nov 22, 2007 21:40:00
If we have two methods with the same name and same number and type of parameters with different return types. Which of the methods takes the precedence?
Joined: Sep 11, 2006
Nov 22, 2007 22:21:00
A method can't have the same method name, but different return type.
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
Joined: Nov 17, 2007
Nov 23, 2007 00:49:00
You would simply get an error
I agree. Here's the link:
subject: method overloding
Private methods in EJBs cannot have transaction attributes
Private methods in super class
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015