0
我正在使用java命令行的mp3播放器,我試圖實現基於IntNode的自己定義的類。我不斷收到一個簡單的錯誤,但是我認爲我有我需要的一切。Java命令行Mp3 - 簡單錯誤
Player.java:125: cannot find symbol
symbol : constructor Player(java.lang.String,Player)
location: class Player
head = new Player(user,head);
^1 error
下面是相關的代碼中的錯誤點:
int i = scan.nextInt(); // User enters how many songs to put in playlist.
System.out.println("Enter the songs wanted for your playlist: ");
System.out.println("Be sure to add '.mp3' to the end! ");
if (i != 0)
{
user = scan.next();
head = new Player(user,head);
}
Player cursor = head;
上我應該做的事情有什麼建議?
它看起來像問題是你的Player類的構造函數;我們可以看到構造函數嗎? – 2011-05-05 19:34:26
發佈您的Player類的代碼。 – yogsma 2011-05-05 19:35:15
你真的導入了Player類嗎?那是什麼關於... – 2011-05-05 19:35:59