摘要:
package operator;public class Demo01 { public static void main(String[] args) { //算术运算符 //ctrl+D 复制当前行到下一行 int a = 10; int b = 20; int c = 25; int d = 阅读全文
摘要:
public class Demon09 {//定义常量static修饰符,不分先后顺序。 static final double Pi = 3.14; public static void main(String[] args) { System.out.println(Pi); }}输出: 3. 阅读全文
摘要:
public class Demo06 { public static void main(String[] args) { int i = 128; double b = i; //强制转换: (类型)变量名 高——底 //自动转换: 底——高 System.out.println(i); Sys 阅读全文
摘要:
public class BeerSong { public static void main(String[] args) { int beerNum = 99; String word = "bottles"; while (beerNum > 0) { if (beerNum == 1) { 阅读全文
摘要:
public class IfTest2 { public static void main(String[] args) { int x = 2; if (x == 3) { System.out.println("x must be 3"); } else { System.out.printl 阅读全文
摘要:
public class Loopy { public static void main(String[] args) { int x = 1; System.out.println("Before the Loop"); while (x<4) { System.out.println("In t 阅读全文
摘要:
public class HelloWorld { public static void main(String[] args) { int i = 10; int i2 = 020; int i3 = 0x12; int i4 = 0b111; System.out.println(i); Sys 阅读全文
摘要:
Hello World 1.编写代码 public class Hello{ public static void main(String[] args){ System.out.print("Hello,WQY"); } } 2.编译命令 javac+ java文件,会生成一个class文件 3. 阅读全文
摘要:
Microsoft Windows [版本 10.0.19042.1110](c) Microsoft Corporation。保留所有权利。 E:\桌面\研究生\假期学习\code>javac Hello.java'javac' 不是内部或外部命令,也不是可运行的程序或批处理文件。 E:\桌面\研 阅读全文