card cannot be resolved to a variable
<p>I'm working on a personal project. It will be a card game that you might for instance compare to pokemon. unfortunately, I'm running into an error and I can't figure out what causes it. I'd appreciate any help!</p>

<p>okay, so I've got the card class (I've left out unnessesary attributes) with a constructor</p>

<pre><code>public class Card 
{
    String name;
    String cardID;
    int strFire;
    int strEarth;

    public Card(String n, String id, int fire, int earth)
    {
        name = n;
        cardID = id;
        strFire = fire;
        strEarth = earth;
    }
}
</code></pre>

<p>then I've got the Deck class, which should create the instances of all cards.</p>

<pre><code>public class Deck 
{
    static void createDeck()
    {
        Card hoax06 = new Card("Nirwadas the Traveler", "hoax06", 3, 2);
        System.out.println(hoax06.name); // this works
    }
}
</code></pre>

<p>and finally, I've got the Game class which holds main.</p>

<pre><code>public class Game 
{
    public static void main(String[] args) 
    {
        Deck.createDeck();
        System.out.println(hoax06.name); // hoax06 cannot be resolved to a variable
    }
}
</code></pre>

<p>I know the answer is probably quite simple but java's accessing system still confuses me. I've also browsed the forum for similar errors but have been unable to apply them to my case. how should I refer to a card from within main?</p>
