上一页 1 ··· 3 4 5 6 7
摘要: 异步:单个字符传输,接受双方可以不用同步进行,就比如说你的键盘输入,电脑内部是不需要准备状态,你输入过来内部就立马接受不需要同步,但是你输入单子字符也就是几个二进制数,内部的硬件反应不过来,即使速度再快还是不能够反应过来你的单个字符,所以我们需要在这串而二进制数前加个0表示开始,让内部有足够的反应时 阅读全文
posted @ 2019-03-05 11:50 爱晒太阳的懒猫。。 阅读(976) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h>#include <stdlib.h>typedef struct Node{ struct Snode *lchild; struct Snode *rchild; int data;}*Node,Snode; void create(Node *l){ int 阅读全文
posted @ 2018-11-11 15:49 爱晒太阳的懒猫。。 阅读(158) 评论(0) 推荐(0) 编辑
摘要: 将上转型对象与abstract的使用结合起来,实现代码设计更加合理化 使得设计与细节实现能够分离开 abstract类不能使用new创建该类的对象,同时如果是非abstract类继承了abstract类,则必须要重写父类中的抽象方法(astract方法),所以abstract与finall一起使用作 阅读全文
posted @ 2018-10-17 15:35 爱晒太阳的懒猫。。 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 多线程中使用Runnable的接口与Thread类来实现,注意是Thread类不是其子类,关键是将Runnable接口作为参数进行传递 另外两个共同的类作为线程则成员变量是共享的。。。。指的是run以外的 Thread.currentThread()返回线程编号 Thread.currentThre 阅读全文
posted @ 2018-10-11 14:28 爱晒太阳的懒猫。。 阅读(113) 评论(0) 推荐(0) 编辑
摘要: 1.多线程并不是并行过程,而是一个使用中断之后另一个继续上,他们共同使用一个cpu资源 class SpeakElephant extends Thread{ public void run(){ for(int i=1;i<=5;i++){ System.out.println("其他线程:初音" 阅读全文
posted @ 2018-10-11 13:18 爱晒太阳的懒猫。。 阅读(93) 评论(0) 推荐(0) 编辑
摘要: import java.io.*;public class BRRead { public static void main(String args[]) throws IOException { char c; // 使用 System.in 创建 BufferedReader BufferedR 阅读全文
posted @ 2018-10-08 17:44 爱晒太阳的懒猫。。 阅读(128) 评论(0) 推荐(0) 编辑
摘要: class A{ void p(int[] a){ int i; for(i=0;i<6;i++){ System.out.println(a[i]); } } void q(String[] b){ int i; for(i=0;i<3;i++){ System.out.println(b[i]) 阅读全文
posted @ 2018-10-08 17:36 爱晒太阳的懒猫。。 阅读(1003) 评论(0) 推荐(0) 编辑
摘要: public class TestArray { public static void main(String arg[]){ int[] list = {1,2,3,4,5,6}; int[] lists = new int[3]; int i; lists[0] = 2; lists[1] = 阅读全文
posted @ 2018-10-08 17:09 爱晒太阳的懒猫。。 阅读(139) 评论(0) 推荐(0) 编辑
摘要: 1.类变量:独立于方法之外的变量,用 static 修饰。 2.实例变量:在类之内,在方法之外。(注意:这里变量可以不初始化) 3.局部变量:在方法之内(注意:变量必须要初始化,否则会报错) public class A() { static int a = 10;//类变量(静态变量) int b 阅读全文
posted @ 2018-10-08 16:37 爱晒太阳的懒猫。。 阅读(246) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7