I have an object 'FOO' which implements Serializable & it contains following Object 'XYZ' within it. Is it correct to have 'ABC' as Serializable as it is Static class within 'XYZ' ? I intend to pass 'FOO' to EJB using RMI. So, it should be Serializable which implies that 'XYZ' & 'ABC' should also be Serializable.
Please suggest. Thanks in advance.
public class XYZ implements Serializable
{
private static class ABC implements Serializable
{
private final static DateFormat DATE_FORMATTER =
DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);
private long startTime;
private long endTime;
private String subject;
}
}
Please suggest. Thanks in advance.
public class XYZ implements Serializable
{
private static class ABC implements Serializable
{
private final static DateFormat DATE_FORMATTER =
DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT);
private long startTime;
private long endTime;
private String subject;
}
}