How to get a string from one class to another
<p>I'm making an air traffic control system and I have a class Plane where a name is called depending on if there is a plane coming. If there is 1 plane then it says KLM if there's none then it says that there is no plane.</p>

<p>I am looking for a way to get this plane name from the plane class to the airport class to put into a queue. This is the code for the plane class</p>

<pre><code>package airtrafficcontrolv3;

import java.util.TimerTask;


class Plane
        extends TimerTask
{

    public int nextPlaneLoop = 0;
    public int planes;
    public int fuel;
    public String planeName;

    @Override
    public void run()
    {
        Observer o = new ObserverImpl();
        Subject s = new SubjectImpl();

        if (nextPlaneLoop &lt;= 167)
        {
            //Currently only running 1 or 0 planes...
            planes = (int) (Math.random() * ((2 - 1) + 1));
            //System.out.println("Random generated plane amount: " + planes);
            //System.out.println("Method called, one whole day loop");
            //Adds to the plane in the airspace loop
            nextPlaneLoop++;
            //System.out.println("Loop incrementing: " + nextPlaneLoop);

            if (planes == 0)
            {
                //System.out.println("No fuel is required as no planes are coming in");
                planeName = "No incoming plane";
                //System.out.println("Planes name is: " + planeName);

                System.out.println("Inbound amount of planes: "+planes);
                System.out.println("Inbound: " + planeName);
                System.out.println("Inbound fuel amount: None ");

                System.out.println(" ");
            }
            else
            {
                //Amount of fuel
                fuel = 30 + (int) (Math.random() * ((120 - 30) + 1));
                //System.out.println("Random fuel: " + fuel);
                planeName = "KLM AirFrance";
                System.out.println("Inbound amount of planes: "+planes);
                System.out.println("Inbound: " + planeName);
                System.out.println("Inbound fuel amount: "+fuel);

                System.out.println(" ");
            }
        }
        else
        {
            this.cancel();
            System.out.println("Day Finished");
        }

                s.addObserver(o);
                s.setState(planeName);

                System.out.println(planeName);

                //finalName = planeName;
                Airport point = new Airport();

                //System.out.println(planeName);
    }
}
</code></pre>

<p>This is what is in my airport class.</p>

<pre><code>/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package airtrafficcontrolv3;
import java.util.*;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Airport
{
    Plane point = new Plane();
    Queue &lt;String&gt; waiting = new LinkedList&lt;String&gt;();

    public Airport()
    {
        //waiting.add(point.);

        while (!waiting.isEmpty())
        {
            System.out.println("Waiting to take off: "+waiting);
            try
            {
                System.out.println("Preparing to taxi: "+waiting.remove());
                Thread.sleep(5000);
            }
            catch (InterruptedException ex)
            {
                Logger.getLogger(Airport.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
    }

}
</code></pre>

<p>Is it possible that anyone can suggest how to get the name from the plane class to the airport class please.</p>
