Results 1 to 4 of 4
Thread: passing arguments
- 04-07-2010, 03:15 PM #1
- 04-07-2010, 03:23 PM #2
- 04-07-2010, 03:36 PM #3
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,386
- Blog Entries
- 7
- Rep Power
- 17
- 04-07-2010, 11:30 PM #4
Senior Member
- Join Date
- Mar 2010
- Posts
- 266
- Rep Power
- 4
if the only thing LaunchCompareJob ever does is perform one operation on p, (A) is preferable. The user of the API won't end up in the situation when he (mistakenly) created a LaunchCompareJob and only then realized it cannot be used for Object p.
for (B), LaunchCompareJob must be stateless.
(B) will allow re-using of LaunchCompareJob for multiple executions with different arguments. If that's a possibility, (B) is better, cause you then create fewer objects.
Similar Threads
-
How do i do a method twice, but with different arguments?
By Meta in forum New To JavaReplies: 6Last Post: 04-05-2010, 09:58 PM -
arguments in command-line
By girlet18 in forum New To JavaReplies: 2Last Post: 01-21-2010, 02:05 PM -
Arguments in Main
By CyberFrog in forum New To JavaReplies: 2Last Post: 03-30-2008, 09:37 PM -
repetition of 'arguments'(?)
By Igor in forum New To JavaReplies: 3Last Post: 12-13-2007, 10:08 AM -
Variable No. of Arguments
By Gajesh Tripathi in forum New To JavaReplies: 2Last Post: 10-31-2007, 02:50 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks