不知道哪里有錯額,請大神指教
public class HelloWorld {
? ? public static void main(String[] args) {
? ? ? ??
// 定義一個長度為5的字符串數(shù)組,保存考試科目信息
String[] subjects = new String[5];
? ? ? ??
// 分別為數(shù)組中的元素賦值
subjects[0] = "Oracle";
subjects[1] = "PHP";
subjects[2] = "Linux";
subjects[3] = "Java";
subjects[4] = "HTML";
? ? ? ??
System.out.println("數(shù)組中第4個科目為:" + subjects[3]);
}
}
2016-06-02
public?class?HelloWorld?{ ????public?static?void?main(String[]?args)?{ ???????? //?定義一個長度為5的字符串數(shù)組,保存考試科目信息 String[]?subjects?=?{"5","4","3","2","1"};??????????????????? ???????? //?分別為數(shù)組中的元素賦值 subjects[0]?=?"Oracle"; subjects[1]?=?"PHP"; subjects[2]?=?"Linux"; subjects[3]?=?"Java"; subjects[4]?=?"HTML"; ???????? System.out.println("數(shù)組中第4個科目為:"?+?subjects[3]); } }2016-04-18
網(wǎng)站編譯器有問題,自己在eclipse上運行就可以了
2016-04-17
不知道為什么系統(tǒng)總是提示錯誤
2016-04-17
沒有錯啊