摘要: package com.itheima03; /* 手机javabean alt+insert(fn)根据自己的选择生成想要的内容 */ public class Phone { private String brand; private int price; public Phone() { } 阅读全文
posted @ 2022-11-13 16:51 NiceTwocu 阅读(59) 评论(0) 推荐(0) 编辑
摘要: package com.itheima03; public class Student { private String name; private int age; public Student(){}; public void setName(String name) { this.name = 阅读全文
posted @ 2022-11-13 16:38 NiceTwocu 阅读(20) 评论(0) 推荐(0) 编辑
摘要: package com.itheima02; public class Student { private String name; private int age; //构造方法 // public Student(){ // System.out.println("无参构造方法"); // } 阅读全文
posted @ 2022-11-13 16:30 NiceTwocu 阅读(14) 评论(0) 推荐(0) 编辑
摘要: package com.itheima02; public class Student { private String name; private int age; //构造方法 public Student(){ System.out.println("无参构造方法"); } public vo 阅读全文
posted @ 2022-11-13 16:17 NiceTwocu 阅读(11) 评论(0) 推荐(0) 编辑
摘要: ![image](https://img2022.cnblogs.com/blog/2426413/202211/2426413-20221113160646433-1616498360.png) ![image](https://img2022.cnblogs.com/blog/2426413/202211/2426413-20221113160655235-104567080.png) 阅读全文
posted @ 2022-11-13 16:08 NiceTwocu 阅读(4) 评论(0) 推荐(0) 编辑
摘要: --统计班级一共有多少个学生 select * from stu; SELECT count(id) from stu ; --count统计的列名不能为空 --查询数学成绩的最高分 SELECT max(math) from stu ; --查询数学成绩的最低分 SELECT min(math) 阅读全文
posted @ 2022-11-13 15:36 NiceTwocu 阅读(30) 评论(0) 推荐(0) 编辑
摘要: --查询学生信息,按照年龄升序排列; SELECT * from stu ORDER BY age ; --查询学生信息,按照数学成绩降序排列; SELECT * from stu ORDER BY math desc; --查询学生信息,按照数学成绩降序排列,如果数学成绩一样,再按照英语成绩升序排 阅读全文
posted @ 2022-11-13 15:24 NiceTwocu 阅读(14) 评论(0) 推荐(0) 编辑