I have an object that's passed in to a function as a parameter i.e public
boolean getProjectTitle (ProjectHeader_ DTO obj) {...}
If I then call a method on this object inside the function i.e
obj.setTitle("t est") then using obj.getTitle() from outside the function it
displays the property set correctly!
But doing something like this inside the function doesn't -
ProjectHeader_D TO x = new ProjectHeader_D TO();
x.setProjectTit le("test");
obj=x;
As long as I explictly set the properties it works but why not when
assigning another object?
Tried using the clone() method aswell & inside the function its works fine
until after the return!
I do not want the object to be return'ed from the function!
Any ideas?
thanks
harry
boolean getProjectTitle (ProjectHeader_ DTO obj) {...}
If I then call a method on this object inside the function i.e
obj.setTitle("t est") then using obj.getTitle() from outside the function it
displays the property set correctly!
But doing something like this inside the function doesn't -
ProjectHeader_D TO x = new ProjectHeader_D TO();
x.setProjectTit le("test");
obj=x;
As long as I explictly set the properties it works but why not when
assigning another object?
Tried using the clone() method aswell & inside the function its works fine
until after the return!
I do not want the object to be return'ed from the function!
Any ideas?
thanks
harry
Comment