Multiple return statements in Java language
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   arun_krishnan
Posted On:   Friday, September 16, 2005 10:28 AM

Dear All,



I have a doubt about using multiple return statements in Java coding. Is it acceptable to use multiple return statements in OOP programming language like Java. In procedural programming it was not right. What about OOP language like Java.


Please provide your suggestions!


arun

Re: Multiple return statements in Java language

Posted By:   Simon_Ablett  
Posted On:   Friday, September 16, 2005 10:34 AM

If you mean 'multiple return statements in a single method' then this is a stylistic rather than an OO point. Personally I advocate that having a single return point makes code easier to maintain and debug regardless of whether you are writing code using a procedural or an OO language.

Regards.
About | Sitemap | Contact