嘿傢伙有這個非常簡單的問題,但似乎無法弄清楚必須導入這個軟件包叫做it
,但我不知道把mac上的實際文件夾放在哪裏,不斷給出一個錯誤package does not exist
,這是一個非常愚蠢的問題,但真的不知道該怎麼辦在mac上導入一個軟件包
這裏是代碼(JAVA):
import it.*;
import java.awt.*;
public class pyramidColour
{
public static void main (String[] args)
{
int col1 = (int)(Math.random()*255+1);
int col2 = (int)(Math.random()*255+1);
int col3 = (int)(Math.random()*255+1);
Color newCol = new Color (col1, col2, col3);
Gogga bug= new Gogga();//creating the gogga
Gogga(1,8);
for (int i = 1; i <= 4; i ++)//loop for going up
{
bug.move();
bug.turnRight();
bug.move();
bug.turnLeft();
}
bug.setDirection(bug.DOWN);
for (int i = 1; i <= 3; i ++)//loop for going down
{
bug.move();
bug.turnLeft();
bug.move();
bug.turnRight();
}
bug.move();
bug.turnRight();
for (int i = 1; i <= 7; i ++)//loop for base of pyramid
{
bug.move();
}
}
}
該項目的下一部分是放環插入的方法,任何幫助將不勝感激。
你能UND顯示您的文件夾結構,你如何試圖編譯/運行的代碼? Maby你的'CLASS_PATH'必須改變嗎? – tbraun89
你正在使用哪個IDE? –