public class HelloWorld{
public static void main(String[] args) {
final String SEX="男";
final String SEXA="女";
System.out.println(SEX);
System.out.println(SEXA);
}
}
public static void main(String[] args) {
final String SEX="男";
final String SEXA="女";
System.out.println(SEX);
System.out.println(SEXA);
}
}
2015-06-07
public class Doubel{
public static void main{String[] args){
double a=176.2;
int b=(int)a;
system.out.println{a}
system.out.println{b}
}
}
public static void main{String[] args){
double a=176.2;
int b=(int)a;
system.out.println{a}
system.out.println{b}
}
}
2015-06-07
public class HelloWorld{
public static void main(String[] args) {
String name="我爱慕课网";
String nameId="www.imooc.com";
System.out.println(name);
System.out.println(nameId);
}
}
public static void main(String[] args) {
String name="我爱慕课网";
String nameId="www.imooc.com";
System.out.println(name);
System.out.println(nameId);
}
}
2015-06-07
public class HelloWorld {
public static void main(String[] args) {
int age=25;
if(age>=18){
System.out.println("成年");
}else{
System.out.println("未成年");
}
}
}
public static void main(String[] args) {
int age=25;
if(age>=18){
System.out.println("成年");
}else{
System.out.println("未成年");
}
}
}
2015-06-06
public class HelloWorld {
public static void main(String[] args) {
int one = 20 ;
if(one %2 ==0){
System.out.println("one是偶数");
}
}
}
public static void main(String[] args) {
int one = 20 ;
if(one %2 ==0){
System.out.println("one是偶数");
}
}
}
2015-06-06
public class HelloWorld{
public static void main(String[] args) {
final String man="男";
final String woman="女";
System.out.println(man);
System.out.println(woman);
}
}
在你打完男和女之后的双引号”和分号;必须是英文体系下的双引号"和分号;,否则很容易出错还不容易看出来
public static void main(String[] args) {
final String man="男";
final String woman="女";
System.out.println(man);
System.out.println(woman);
}
}
在你打完男和女之后的双引号”和分号;必须是英文体系下的双引号"和分号;,否则很容易出错还不容易看出来
2015-06-06