FearsomeFastFemale
Programmer
Hi,
I am new to java (from mainframe cobol) so forgive me if this is a basic question.
I want to call a java method with a string, and 2 intergers. (this I can do) I want to return, a return code of true/false, and 2 intergers (not the same 2 that went in)
It seams I can do it 3 ways
1) return 1 long string and the parse into the 3 parts.
2) return an array
3) have a nested class to define the return variables.
Option 3 seems to be the most logical to me,
Option 2 has been susgested to me locally. I dont like this as I think of an array as group of simaler objects, days of the week etc. and of the same type.
Option 1 just looks horrible.
What are your opinions, I want code that is efficant maintainable and readable.
I am new to java (from mainframe cobol) so forgive me if this is a basic question.
I want to call a java method with a string, and 2 intergers. (this I can do) I want to return, a return code of true/false, and 2 intergers (not the same 2 that went in)
It seams I can do it 3 ways
1) return 1 long string and the parse into the 3 parts.
2) return an array
3) have a nested class to define the return variables.
Option 3 seems to be the most logical to me,
Option 2 has been susgested to me locally. I dont like this as I think of an array as group of simaler objects, days of the week etc. and of the same type.
Option 1 just looks horrible.
What are your opinions, I want code that is efficant maintainable and readable.