03 2021 档案
摘要:public class ArrayDemo01 { public static void main(String[] args) { //变量类型 变量名字 = 变量的值 //数组类型 int[] nums;//1.定义 主流 声明数组 //int nums2[];//2. nums = new
阅读全文
摘要:~~~java public class Demo04 { public static void main(String[] args) { Demo04 demo04 = new Demo04(); demo04.test(1,2,3); } public void test(int... i){
阅读全文
摘要:public class Demo01 { //main方法 public static void main(String[] args) { //实际参数:实际调用传递的参数 int sum = add(1, 2); System.out.println(sum); test(); } //加法
阅读全文
摘要:public class BreakDemo01 { public static void main(String[] args) { int i=0; while (i<100){ i++; System.out.println(i); if(i==30){ break; } } System.o
阅读全文
摘要:public class WhileDemo03 { public static void main(String[] args) { //计算1-100的和 int i=0; int sum=0; while (i<=100){ sum=sum+i; i++; } System.out.print
阅读全文
摘要:if单选择结构 if双选择结构 ifif多选择结构 public class IfDemo03 { public static void main(String[] args) { Scanner scanner = new Scanner(System.in); System.out.printl
阅读全文
摘要:public class Demo03 { public static void main(String[] args) { //从键盘接收数据 Scanner scanner = new Scanner(System.in); System.out.println("请输入数据:"); Strin
阅读全文
摘要:导入这个包下所有的类; package com.st.base; /** * @author st * @version 1.0 * @since 1.8 * */ public class Doc { String name; /** * * @param name * @return * @th
阅读全文
摘要:public class Demo07 { public static void main(String[] args) { int a=10; int b=20; a+=b;//a=a+b a-=b;//a=a-b System.out.println(a); //字符串连接符 +, 有字符串计算
阅读全文
摘要://逻辑运算符 public class Demo05 { public static void main(String[] args) { //与(and) 或(or) 非(取反) boolean a=true; boolean b=false; System.out.println("a &&
阅读全文
摘要:public class Demo04 { public static void main(String[] args) { //++ -- 自增 自减 一元运算符‘ int a=3; int b=a++;//执行完这行代码后,先给b赋值,再自增 //a++ a=a+1 System.out.pri
阅读全文
摘要:package operator; public class Demo01 { public static void main(String[] args) { //二元运算符 //Ctrl+D 复制当前行到下一行 int a=10; int b=20; int c=30; int d=40; Sy
阅读全文
摘要:public class Demo08 { //类变量 static static double salary=2500; //属性:变量 //实例变量:从属于对象; 如果不进行初始化,这个类型的默认值是0,0.0 //布尔类型:默认值的false //除了基本类型。其余默认值都是null Stri
阅读全文
摘要:##类型转换 小数的优先级一定大于整数 public class Demo05 { public static void main(String[] args) { int i=128; byte b=(byte)i; System.out.println(i);//128 System.out.p
阅读全文
摘要:public class Demo03 { public static void main(String[] args) { //整数拓展: 二进制0b 十进制 八进制0 十六进制0x int i = 10; int i2 = 010;//八进制 int i3 = 0x10;//十六进制 0-9 A
阅读全文
摘要:1注释 public class HelloWorld { public static void main(String[] args) { //单行注释 输出一个Hello,World System.out.println("Hello World"); /* 我是多行注释 可以注释一段文字 */
阅读全文
摘要:编译型 一次性将所有操作都执行;例如操作系统 C/C++ 解释型 网页(对速度要求不高),边解释边执行 IDEA安装 IDE 集成开发环境
阅读全文
摘要:3编写代码 public class Hello{ public static void main(String[] args){ System.out.print("Hello,world!"); } } 4编译javac java 文件,会生成一个class文件 5运行class文件,java
阅读全文
摘要:JDK Java开发者工具 JRE Java运行环境 JVM Java虚拟机 卸载JDK 安装jdk
阅读全文
摘要:Windows快捷键 Ctrl+A:全选 Ctrl+Z:撤销 Ctrl+X:剪切 Alt+F4:关闭窗口 Shift+Delete:永久删除 Windows+R:运行;cmd:命令行窗口 Windows+E:打开我的电脑 Ctrl+Shift+Esc:打开任务管理器 Windows+TAB:多窗口切
阅读全文
摘要:二级标题 三级标题 hello world 粗体 hello world 斜体 hello world 引用 选择java 分割线 图片 超链接 超链接 ##列表 A B A B 代码
阅读全文
浙公网安备 33010602011771号