参考:
int sum=age1+age2+age3+age4;
double avg=sum/4;
int minus=age1-age2;
int newAge=(int)--age1;
int sum=age1+age2+age3+age4;
double avg=sum/4;
int minus=age1-age2;
int newAge=(int)--age1;
2014-12-31
public class HelloWorld{
public static void main(String[] args) {
String age="我爱慕课网";
System.out.println(""+age);
String butterfly="www.imooc.com";
System.out.println(""+butterfly);
}
}
public static void main(String[] args) {
String age="我爱慕课网";
System.out.println(""+age);
String butterfly="www.imooc.com";
System.out.println(""+butterfly);
}
}
2014-12-31
public class HelloWorld{
public static void main(String[] args) {
char sex = '男';
final String GIRL ="女";
System.out.println(sex);
System.out.println(GIRL);
}
}
public static void main(String[] args) {
char sex = '男';
final String GIRL ="女";
System.out.println(sex);
System.out.println(GIRL);
}
}
2014-12-31