title: What is outData.writeInt() does in Java?
body: <p>I am new to Java programming language, infact I only have some basic concept of programming. I came across the following piece of Java code and I couldn't understand a function in there. I would be grateful if someone kindly explain it to me what does 'outData.writeInt()' do and how to use it? Thank you.</p>
  
  <pre><code> try {
      if(moe.getSource() == forward)outData.writeInt(1);
      if(moe.getSource() == reverse)outData.writeInt(2);
      if(moe.getSource() == leftTurn)outData.writeInt(3);
      if(moe.getSource() == rightTurn)outData.writeInt(4);
      if(moe.getSource() == speedUp)outData.writeInt(6);
      if(moe.getSource() == slowDown)outData.writeInt(7);
  
      outData.flush(); 
      }
   catch (IOException ioe) {
      System.out.println("\nIO Exception writeInt");
   }
  </code></pre>