最新回答 / lucasj
別的也可以,具體看你的數(shù)組是什么數(shù)據(jù)類型的,舉例:如果是整數(shù)數(shù)組,那就用int如果是字符串?dāng)?shù)組,那就用String如果是浮點(diǎn)型數(shù)組,那就用double
2023-07-20
public class HelloWorld{
public static void main(String[] args){
System.out.println("hello imooc!");
}
}
public static void main(String[] args){
System.out.println("hello imooc!");
}
}
2023-05-16
int score = 60;
int count = 0;
System.out.println("加分前成績(jī): " + score);
for (; score < 60; count++,score++) {
}
System.out.println("加分后成績(jī): " + score);
System.out.println("共加了" + count +"次!");
int count = 0;
System.out.println("加分前成績(jī): " + score);
for (; score < 60; count++,score++) {
}
System.out.println("加分后成績(jī): " + score);
System.out.println("共加了" + count +"次!");
2023-05-09
最新回答 / weixin_慕絲3555851
char:本身是一個(gè)基本數(shù)據(jù)類型,存儲(chǔ)的是字符的原始值,不是對(duì)象,不存在可變性的概念。String:是一個(gè)對(duì)象,具有不可變性。一旦創(chuàng)建了一個(gè)?String?對(duì)象,它的內(nèi)容就不能被修改。任何對(duì)?String?的修改操作實(shí)際上都會(huì)創(chuàng)建一個(gè)新的?String?對(duì)象。
2023-04-04