looks like u have to consider returning an array or an object that has those 2 param.
--- On Wed, 10/14/09, John Joseph <[email protected]> wrote: From: John Joseph <[email protected]> Subject: [java programming] Can I return two variables value in a method To: [email protected] Date: Wednesday, October 14, 2009, 11:44 PM Hi I want to return values of two variables "totalscore" and "totalextra "in a method , for example can I do like this public static int calcTotal( FootballScore[] f ) { int totalscore = 0; int totalextra = 0; for ( int i = 0; i < f.length; ++i ) { total += f[i].score ; totalextra += f[i].extras; } return totalscore; return totalextra; } From cricket scores to your friends. Try the Yahoo! India Homepage! http://in.yahoo.com/trynew --~--~---------~--~----~------------~-------~--~----~ To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en -~----------~----~----~----~------~----~------~--~---
