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;
}
}
}
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;
}
}
}
2015-07-11
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-07-11
public class HelloWorld {
public static void main(String[] args) {
int age=60;
if (age>60)
{
System.out.println("老年");
}
else if(age>=40)
{
System.out.println("中年");
}
else if(age>=18)
{
System.out.println("少年");
}
else
{
System.out.println("童年");
}
没看到一个评论是对的.
public static void main(String[] args) {
int age=60;
if (age>60)
{
System.out.println("老年");
}
else if(age>=40)
{
System.out.println("中年");
}
else if(age>=18)
{
System.out.println("少年");
}
else
{
System.out.println("童年");
}
没看到一个评论是对的.
2015-07-11