D:\DuelMonsters\src\duelmonsters>javac DuelMonsters.java
DuelMonsters.java:18: cannot resolve symbol
symbol : class Deck
location: package duelmonsters
duelmonsters.Deck deck1 = new duelmonsters.Deck(40);
^
DuelMonsters.java:18: cannot resolve symbol
symbol : class Deck
location: package duelmonsters
duelmonsters.Deck deck1 = new duelmonsters.Deck(40);
^
Here is my code for my Deck class, somewhat revamped:
package duelmonsters;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class Deck
{
java.util.Random generator = new java.util.Random();
public int dS;
public Deck()
{
int[] arrDeck;
}//end Deck()
public int[] setDeck(int dS, int[] arrDeck)
{
for (int i = 0; i < dS; i++)
{
arrDeck[i] = generator.nextInt(100);
}//end for
return arrDeck;
}//end Deck()
}//end Deck
And here is the DuelMonsters class:
package duelmonsters;
import java.applet.*;
import java.awt.*;
import java.awt.event.*;
import duelmonsters.*;
/**
* <p>Title: </p>
* <p>Description: </p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: </p>
* @author not attributable
* @version 1.0
*/
public class DuelMonsters extends Applet
{
duelmonsters.Deck deck1 = new duelmonsters.Deck();
String string = "";
Label test = new Label(deck1.toString());
public void init()
{
add(test);
}
}
It''s almost as if the compiler has trouble recognizing the connection between the two files. JBuilder doesn''t say anything though.