上一页 1 ··· 3 4 5 6 7 8 下一页
摘要: 1. mysql常用的命令 (1)mysql安装启动命令: mysq -uroot -p密码 -u 用户名 -p 密码 (2)查看所有的数据库: show databases; (3)创建数据库 格式:create database 数据库名 create database mydatabase; 阅读全文
posted @ 2021-06-30 21:06 homle 阅读(85) 评论(0) 推荐(0) 编辑
摘要: 冒泡排序: 比较相邻两个数的大小,如果左边大于右边,就交换左右两边的数据,否则不交换,当第一轮比较完成后,序列数中最大的数会排序到最右边;然后在进行其他数比较,比较原理相同,完成比较后,序列数会从左到右从小到大排列; 原始数据:9 8 10 7 6 0 11 第一轮循环:比较的数据(9 8 10 7 阅读全文
posted @ 2021-02-07 22:09 homle 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 1. IDEA中是自动保存的, 不用ctrl+s; 2. 快捷键:psvm ,可以直接生成main方法(首字母小写); 3. 快捷键:sout,可以自动生成println方法; 4. 快捷键:ctrl+y 删除光标位置一行; 5. 左侧窗口列表的展开和关闭: a. 左箭头关闭; b. 右箭头展开 c 阅读全文
posted @ 2021-01-11 22:37 homle 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 示例1: public class SuperTest{ public static void main(String[] args){ Vip v = new Vip("zhang"); v.shopping(); } } class Customer{ String name; public C 阅读全文
posted @ 2021-01-04 21:59 homle 阅读(297) 评论(0) 推荐(0) 编辑
摘要: 先创建一个父类Animal类: public class Animal{ public void move(){ System.out.println("动物可以移动"); } } 创建子类Cat类: public class Cat extends Animal{ public void move 阅读全文
posted @ 2021-01-03 11:16 homle 阅读(385) 评论(0) 推荐(0) 编辑
摘要: this的概念: this保存当前对象的内存地址,指向自身; this保存在堆内存的对象中; this用来访问实例变量 ,表示当前对象,所以this不使用于静态方法中,可以省略; public class ThisTest02{ public static void main(String[] ar 阅读全文
posted @ 2020-12-27 22:52 homle 阅读(303) 评论(0) 推荐(0) 编辑
摘要: 静态代码块的使用: 示例一: public class StaticTest03{ static{ System.out.println("A"); } static{ System.out.println("B"); } public static void main(String[] args) 阅读全文
posted @ 2020-12-23 22:42 homle 阅读(201) 评论(0) 推荐(0) 编辑
摘要: public class StaitcTest02{ public static void main(String[] args){ Chinese c1 = new Chinese("11111111","zhang","中国"); System.out.println(c1.idCard); S 阅读全文
posted @ 2020-12-20 13:10 homle 阅读(276) 评论(0) 推荐(0) 编辑
摘要: 1 .先不使用static public class StaticTest{ public static void main(String[] args){ Chinese c1 = new Chinese("11111111","zhang","中国"); System.out.println(c 阅读全文
posted @ 2020-12-20 12:49 homle 阅读(1231) 评论(0) 推荐(0) 编辑
摘要: public class NullPointer{ public static void main(String[] args){ Customer c = new Customer(); System.out.println(c.id); //0 c.id = 1213; System.out.p 阅读全文
posted @ 2020-12-13 11:00 homle 阅读(163) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 下一页