Passing/storing info from a class?
<p>I'm a beginner with Java and I'm making a simple text RPG and I want to store character information in a class such as Name, Job, Age, etc. For example:</p>

<pre><code>class myChar
{
    String name = "";
    String job = "";
    int age = 0;
    //set, get, etc...
}
</code></pre>

<p>And I want the user to be able to be asked what their name, job, etc. is and pass it back into the class to that it can be pulled up later on. I understand how to do this with ints quite well, for example I have a Stats class where the HP, attack power, etc. is stored:</p>

<pre><code>class Stats // Demonstrates Class
{
    int hp = 10;
    //set, get, etc...
    public int hit() // Player is hit
    {
        hp --;
        return hp;
    }
}
</code></pre>

<p>So as you see I have a small grasp on it but I'm not quite sure how to get it so the player can enter this information and have it be stored. I understand this usage:</p>

<pre><code>Stats myStats = new Stats("John", "Warrior", 30);
</code></pre>

<p>When it comes to identifying the info, but not how to let the player choose it for themselves. I'm sorry if I sound too vague, I'll update my post as needed!</p>

<p>Edit: I have a main public class which contains the different "rooms" and such. It's pretty lengthy, and I know how to get user input. For instance, I have a command window which allows the user to "look", "use", "get", etc. So I understand user input quite well. I just don't get how to have the user enter info and store this info in an outside class to be called upon later.</p>
