public class HelloWorld{
public static void main(String[] args) {
String a ="我爱慕课网";
String b ="www.imooc.com";
System.out.println(a+"\n"+b);
}
}
public static void main(String[] args) {
String a ="我爱慕课网";
String b ="www.imooc.com";
System.out.println(a+"\n"+b);
}
}
2015-08-12
ublic class HelloWorld{
public static void main(String[] args) {
String hobby="我爱慕课网"
System.out.println(hobby);
String imooc="www.imooc.com"
String.out.println(imooc);
}
}
public static void main(String[] args) {
String hobby="我爱慕课网"
System.out.println(hobby);
String imooc="www.imooc.com"
String.out.println(imooc);
}
}
2015-08-12
public static void main(String[] args) {
int today =7;
switch (today) {
case 1:
case 3:
case 5:
System.out.println("吃包子");
break;
case 2:
case 4:
System.out.println("吃油条");
break;
case 7:
System.out.println("主席套餐");
break;
}
}
int today =7;
switch (today) {
case 1:
case 3:
case 5:
System.out.println("吃包子");
break;
case 2:
case 4:
System.out.println("吃油条");
break;
case 7:
System.out.println("主席套餐");
break;
}
}
2015-08-12
public class HelloWorld {
public static void main(String[] args) {
int score = 94;
String sex = "女";
if(score > 80){
System.out.println("进入" + sex + "子组决赛");
}
}
}
public static void main(String[] args) {
int score = 94;
String sex = "女";
if(score > 80){
System.out.println("进入" + sex + "子组决赛");
}
}
}
2015-08-12
public class HelloWorld {public static void main(String[] args) {char today='日';switch (today){ case'一':case'三': case'五':System.out.println("早餐吃包子");break;case'二':case'四':case'六':System.out.println("早餐吃油条");break;case'日':System.out.println("吃主席套餐");break;default :System.out.println("难道是世界末日");
}}}
}}}
2015-08-12
public class HelloWorld {
public static void main(String[] args) {
int score = 94;
String sex = "女";
if (score >80){
if ( sex == "女")
System.out.println("进入女子组决赛");
else System.out.println("进入男子组决赛");
}
else
System.out.println("未进入决赛");
}
}
public static void main(String[] args) {
int score = 94;
String sex = "女";
if (score >80){
if ( sex == "女")
System.out.println("进入女子组决赛");
else System.out.println("进入男子组决赛");
}
else
System.out.println("未进入决赛");
}
}
2015-08-12
public class HelloWorld{
public static void main(String[] args) {
final char SEX1='男';
final char SEX2='女';
System.out.println(SEX1);
System.out.println(SEX2);
}
}
public static void main(String[] args) {
final char SEX1='男';
final char SEX2='女';
System.out.println(SEX1);
System.out.println(SEX2);
}
}
2015-08-12