I believe you need to implement Serializable for both classes. For example,
I use:
public class A implements Serializable {
public static class B implements Serializable {
public B() {/*default constructor required*/}
@Override
public String toString() { /*stuff*/}
@Override
public boolean equals(Object obj) {/*stuff*/}
@Override
public int hashCode() {/*stuff*/}
}
}
Hope this helps, -Dan
On Wed, Oct 22, 2014 at 7:06 AM, Samit Sasan <[email protected]> wrote:
> My guess is only if Class A holds a reference to an object of Class B,
> otherwise its fine.
>
> -Samit
>
> On Wed, Oct 22, 2014 at 3:35 PM, [email protected] <[email protected]>
> wrote:
>
>> for example:
>>
>> public Class A implements Serializable {
>> Class B{
>> ....
>> }
>> }
>>
>> my question is if B should implements Serializable to be transfer to
>> another component ?
>>
>
>
--
Dan DeCapria
CivicScience, Inc.
Back-End Data IS/BI/DM/ML Specialist