public void sorts(int [] scores){
int j=3;
System.out.println("考试成绩的前三名为:");
for(int i=scores.length-1;i>=0&&j>0;i--){
if(scores[i]>=0&&scores[i]<=100){
System.out.println(scores[i]);
j--;
}
}
}
int j=3;
System.out.println("考试成绩的前三名为:");
for(int i=scores.length-1;i>=0&&j>0;i--){
if(scores[i]>=0&&scores[i]<=100){
System.out.println(scores[i]);
j--;
}
}
}
public class HelloWorld{
public static void main(String[] args) {
String malove="我爱幕课网";
String html="www.imooc.com";
System.out.println(malove);
System.out.println(html);
}
}
public static void main(String[] args) {
String malove="我爱幕课网";
String html="www.imooc.com";
System.out.println(malove);
System.out.println(html);
}
}
2015-06-20
int age=25;
if(age>=60){
System.out.println("老年");}
else if(age<60&age>=40){
System.out.println("中年");}
else if(age>=18&age<40){
System.out.println("少年");}
else(age<=18){
System.out.println("童年");}
这个哪点错了呀,大神帮我看看
if(age>=60){
System.out.println("老年");}
else if(age<60&age>=40){
System.out.println("中年");}
else if(age>=18&age<40){
System.out.println("少年");}
else(age<=18){
System.out.println("童年");}
这个哪点错了呀,大神帮我看看
2015-06-19
HelloWorld hello = new HelloWorld();
hello.print();
hello.print("imooc");
hello.print(18);
hello.print();
hello.print("imooc");
hello.print(18);
2015-06-19