title: Sending a message between client-server with ID - Java
body: <p>Given the function below:</p>
  
  <pre><code>void sendMessage(String msg)
  {
      try{
          out.writeObject(msg);
          out.flush();
          System.out.println("client&gt;" + msg);
      }
      catch(IOException ioException){
          ioException.printStackTrace();
      }
  }
  </code></pre>
  
  <p>is there anyway to add like an identifier to the string msg so every message would have an unique ID ?</p>