title: how to add data to an array in while loop java
body: <p>How to add str,str1,str2,str22,name,randNo to an String array,the data in loop(while) may changes each time.
  when connection established,user sends data to the following program, it need to store it in an array.</p>
  
  <pre><code>   String s[][]=new s[100][100];
     ServerSocket ss=new ServerSocket(9999);
     while(true)
     {
  
      Socket s=ss.accept();
      DataInputStream dis=new DataInputStream(s.getInputStream());
      int str=dis.readInt();
      System.out.println("message= "+str);
      int str1=dis.readInt();
      System.out.println("message= "+str1);
      int str2=dis.readInt();
      System.out.println("message= "+str2);
      int str22=dis.readInt();
      System.out.println("message= "+str22);
      String name=dis.readUTF();
      System.out.println("message= "+name);
      int randNo=dis.readInt();
      System.out.println("Unique no:"+randNo);
      s[][]={{str,str1,str2,str22,name,randNo}};
      }
  </code></pre>