access variables of one class in another class
<p>In my app, I have a class called <strong>Monsters</strong> that reads in data from an XML file. This Monster class calls another class called <strong>MonsterStats</strong>.</p>

<p><em>Monster</em> uses data from the XML file to set variables in the <em>MonsterStats</em> class.</p>

<p>Is there a way to use these variables in another class? </p>

<p>Monster.java</p>

<pre><code>public class Monster {

public MonsterStats monsterStats;

...processXML pseudo code...
monsterStats.name = xml.monsterName;
monsterStats.type = xml.monsterType;
monsterStats.race = xml.monsterRace;
...etc...
}
</code></pre>

<p>MonsterStats.java</p>

<pre><code>public class MonsterStats {
//encounter info
public String name = "";
public String type = "";
public String race = "";
public String gender = "";
public String alignment = "";   
public int age = 0;

}
</code></pre>

<p>someOtherClass.java</p>

<pre><code>public class someOtherClass {
    //how can I access the variables in MonsterStats
    // that were just set by Monsters???
}
</code></pre>
