摘要:
方法 什么是方法 方法的定义和调用 package method; public class Demo1 { public static void main(String[] args) { String s = sayHello(); System.out.println(s); int t1 = 阅读全文
摘要:
Scanner 程序结构详解: main方法作为程序运行入口 Scanner scanner = new Scanner(System.in);使用new方法创建一个scanner对象,作为接收键盘数据的入口 scanner.next()用于接收键盘数据 public static void mai 阅读全文
摘要:
算数运算符 package base; public class Operational { public static void main(String[] args) { //二元运算符 //command + D :复制当前行到下一行 int a = 10; int b = 20; int c 阅读全文
摘要:
package base; import java.util.Date; public class ClassTransform { public static void main(String[] args) { int i = 128; byte b = (byte)i;//内存溢出,数据出错 阅读全文