北小柒

导航

 

2021年11月19日

摘要: 面向对象笔记 面向对象的思想:物以类聚,分类的思维方式 ,思考问题先把问题进行分类,对这些分类进行单独思考,然后再对某个分类下的细节进行面向过程的探索. 面向过程的思想:步骤清晰简单,第一步做什么,第二步做什么,适合处理一些较为简单的问题. 对于描述复杂的事物,为了从宏观上把我,从整体上合理分析,我 阅读全文
posted @ 2021-11-19 17:08 北小柒 阅读(31) 评论(0) 推荐(0)
 

2021年11月18日

摘要: // abstract 抽象类:类 extends : 单继承~ (接口可以多继承) // 约束~有人帮我们实现~ //abstract,抽象方法,只有方法名字,没有方法的实现!// public abstract class Person {// public abstract void run( 阅读全文
posted @ 2021-11-18 17:36 北小柒 阅读(16) 评论(0) 推荐(0)
 
摘要: 接口作用: 1.约束,接口中的类都默认为抽象类,public abstract都会省略; 2.定义一些方法,让不同的人实现~ 10 >1 3.public abstract; interface ,implements 4.public static final 常量定义 5.接口不能实例化,在抽象 阅读全文
posted @ 2021-11-18 17:35 北小柒 阅读(9) 评论(0) 推荐(0)
 

2021年10月23日

摘要: 阅读全文
posted @ 2021-10-23 12:46 北小柒 阅读(57) 评论(0) 推荐(0)
 

2021年10月17日

摘要: public class Demo07 { public static void main (String [] args){ //int sum = add(2,5); //实际参数 //System.out.println(sum); test (); } public static int a 阅读全文
posted @ 2021-10-17 17:06 北小柒 阅读(19) 评论(0) 推荐(0)
 
摘要: public class Demo06 { public static void main (String []args){ //打印三角形作业 for (int i = 1;i <= 5;i++) { for (int j = 5; j >= i;j--){ System.out.print(" 阅读全文
posted @ 2021-10-17 16:41 北小柒 阅读(26) 评论(0) 推荐(0)
 
摘要: public class Demo01{ public static void main(String[] args){ int max = max(10,10); System.out.println(max); } public static int max(int num1,int num2) 阅读全文
posted @ 2021-10-17 16:32 北小柒 阅读(20) 评论(0) 推荐(0)
 

2021年9月21日

摘要: public class Demo05 { public static void main(String[] args) { //操作比较大的数的时候,注意溢出问题 //JDK7新特性,数字之间可以用下划线分割 int money = 10_0000_0000; int years = 20; in 阅读全文
posted @ 2021-09-21 19:21 北小柒 阅读(25) 评论(0) 推荐(0)
 
摘要: { public static void main(String[] args) { int i = 128; byte b = (byte) i;//内存溢出无法正常转换 double c = i; //强制转换 (类型)变量名 从高转化为低等级 //自动转换 从低转化为高等级 不需要括号 Sys 阅读全文
posted @ 2021-09-21 17:45 北小柒 阅读(24) 评论(0) 推荐(0)
 
摘要: Markdown学习 字体 hello hello hello hello 引用 跳送至www.baidu.com 分割线 图片 超链接 跳转 列表 表格 名字性别生日 代码 ​ 阅读全文
posted @ 2021-09-21 17:23 北小柒 阅读(18) 评论(0) 推荐(0)