title: simple UDP server, error: int cannot be converted to String in BlueJ
body: <p>I'm a beginner at java and trying out a simple sever client that's supposed to connect to a socket and send a string message. (I'm using BlueJ) When I try to run it, I enter the port a number and it tells me "Error: incompatible types: int cannot be converted to java.lang.String[]". I'm confused as I'm trying to do a reverse, string to int. Here's my code: </p>
  
  <pre><code>import java.io.*;
  import java.net.*;
  public class HelloServer
  {
      public static void main(String[] args)
      {
          String msg="words of a message";
              try
              {
                  byte [] data = msg.getBytes();
                  int port = Integer.parseInt(args[0]);
                  InetAddress address = InetAddress.getLocalHost();
                  DatagramSocket socket = new DatagramSocket(port, address);
                  DatagramPacket request = new DatagramPacket(data, data.length,address, port);
                  socket.send(request);
                  System.out.println(data);
              }
              catch (Exception e)
              {System.out.println(e);} 
      }
  }
  </code></pre>
  
  <p>P.S. It compiles but there may be mistakes I'm not aware of, also it's a part of my uni work and I have to pass the port number, so I can't just specify it as a variable. 
  I suspect it's something very simple but I can't figure it out and move on, any help would be appreciated! </p>