Can I send an array within Serializable object between ObjectOutputStream and ObjectIntputStream using socket
<p>we have this object and need to send throughout socket : </p>

<pre><code>static class Msg implements Serializable {
 int num;
 String name;
 boolean [] sign; 
 //modify 'Message' to 'Msg'....
 public Msg( int num, String name,boolean[] sign) {
   super();
   this.num=num;
   this.name=name;
   this.sign=sign; 
    Myarraycopy(this.sign,sign);
  }
 public boolean[] getsign() {
  return sign
 }
 // Some methods
}
</code></pre>

<p>however in other part of the code.  </p>

<pre><code>  Socket _socket;
</code></pre>

<p>one side</p>

<pre><code>  ObjectOutputStream out = new ObjectOutputStream(_socket.getOutputStream());
  Msg senMsg = new Msg(3,"Fine", new boolean[]{true,true,true})
      out.writeObject(senMsg);
</code></pre>

<p>................... in the other side</p>

<pre><code>   ObjectInputStream in = new ObjectInputStream(_socket.getInputStream());
        Msg recMsg = (Msg) in.readObject();
   boolean[] s = recMsg.getsign();
  System.out.println(s[0]+", "+ s[1]", "+s[2]);
</code></pre>

<p>why the output is: false, false, false.</p>

<p>how to retrieve the values of an array from ObjectInputStream;</p>
