Can't invoke a method from an object in a hashtable
<p>so all I'm trying to do is create this object and then store it and others like it in a hashtable and then use ones of its methods later.  But when I try and get the object and use its method I get an error.</p>

<p>My Code:</p>

<pre><code>D_Object obj;
Hashtable player_table;

obj = new D_Object("pikachu",pikachu,PLAYER_X,PLAYER_Y,PIKA_WIDTH,PIKA_HEIGHT,PIKA_OFFSETX,PIKA_OFFSETY,PLAYER_SPEED);

player_table.put(obj.getObjNum(),obj);
</code></pre>

<p>....then later I try and use the objects method getObjNum() and it gives me an error</p>

<pre><code>for(int i=1;i&lt;=obj.getNumObjs();i++){
    if(player_table.get(i).getObjNum() != obj.getObjNum()){
</code></pre>

<p>....</p>

<p>the error is as follows:</p>

<pre><code>appletGameExample.java:319: cannot find symbol
symbol  : method getObjNum()
location: class java.lang.Object
</code></pre>

<p>It gives the same error for any time I try and use the methods from this object</p>

<p>Can someone please help?</p>
