What's wrong with this code?
<p>I just started experimenting with java today (have experience with javascript and PHP) and am having trouble compiling this code.</p>

<p>I am using NewBeans IDE 6.8 on Mac.</p>

<p>It just says "One or more projects were compiled with errors."</p>

<p>The problem began when I tried adding a custom function in.</p>

<p>Here's the code (ignore all the comments):</p>

<pre><code>import java.io.*;
import java.net.*;

public class simpleServer
{
    public static void main(String args[])
    {
    }

    public void clientLoop()
    {
        // Message terminator
        char EOF = (char)0x00;

        try
        {
            // create a serverSocket connection on port 9999
            ServerSocket s = new ServerSocket(4041);

            System.out.println("Server started. Listening for connections...");
            // wait for incoming connections
            Socket incoming = s.accept();

            BufferedReader data_in = new BufferedReader(
                    new InputStreamReader(incoming.getInputStream()));
            PrintWriter data_out = new PrintWriter(incoming.getOutputStream());

            data_out.println("Connected to Shipz Server." + EOF);
            data_out.flush();

            boolean quit = false;


            while (!quit)
            {
                String msg = data_in.readLine();

                if (msg == null) quit = true;

                if (!msg.trim().equals("EXIT"))
                {
                    if(msg.trim().equals("hShipzClient"))
                    {
                        System.out.println("Client Connected");
                    }

                    if(msg.trim().equals("c")){
                        System.out.println("Player collision");
                        data_out.println("You crashed!");
                    }
                    data_out.flush();
                }
                else
                {
                    quit = true;
                }
            }
        }
        catch (Exception e)
        {
            System.out.println("Connection lost");
        }
    }
</code></pre>

<p>Thanks</p>
