How do i use a class from a different file in java?
<p>Am new at Java and this is what am attempting to do;</p>

<p>I Have two files located on this folder on a windows machine;</p>

<pre><code>d:\programs\sims\javasim\src\com\jsim\
Person.java
Building.java
</code></pre>

<p>On my Building.java am making use of class Person located in file Person.java i.e.</p>

<pre><code>package com.jsim;
ArrayList&lt;Person&gt; personList = new ArrayList&lt;Person&gt;();
</code></pre>

<p>Am compiling the files from this folder</p>

<pre><code>d:\programs\sims\javasim\src
</code></pre>

<p>But when i try to compile Building.Java, the compiler tells me</p>

<pre><code>d:\programs\sims\src\javac com/jsim/Building.java

com\jsim\Building.java:10: cannot find symbol
symbol  : class Person
location: class com.jsim.Building
        private ArrayList&lt;Person&gt;personList = new ArrayList&lt;Person&gt;();
                          ^
</code></pre>

<p>How can i make Building.java know about class Person in file Person.java?</p>

<p>Gath</p>
