随笔分类 -  Java基础

Java Array
摘要:refer to https://www.javatpoint.com/array-in-java Nomally, array is a collection of similar type of elements that hava a contiguous memory location. J 阅读全文

posted @ 2019-02-20 13:53 chenqr11 阅读(92) 评论(0) 推荐(0)

Java static keyword
摘要:The static in java is used for memory management mainly. We can apply static with variables, methods, blocks and class. 1) Java static variable If you 阅读全文

posted @ 2019-02-15 02:24 chenqr11 阅读(211) 评论(0) 推荐(0)

Final Keyword In Java
摘要:The final keyword in java is used to restrict the user. The java final keyword can be used in many context. like: 1. variable 2. method 3. class 1) Ja 阅读全文

posted @ 2019-02-13 11:58 chenqr11 阅读(268) 评论(0) 推荐(0)

what is the difference between Integer and int in java?
摘要:int is a primitive type, Variables of int type store the actual binary value for the Integer type you want to represent. Integer is a class, no diffee 阅读全文

posted @ 2019-02-09 22:17 chenqr11 阅读(232) 评论(0) 推荐(0)

java基础_变量
摘要:变量: 数据类型: 基本类型:short/byte(1byte)/char(2byte)-->int(4byte)-->long(8byte)-->float(8byte)-->double(16byte,默认)、boolean java变量 从本质上讲,变量其实是内存里面的一小块区域,.exe文件 阅读全文

posted @ 2017-03-07 13:49 chenqr11 阅读(109) 评论(0) 推荐(0)

数组(二)
摘要:一:数组排序 选择排序 冒泡排序 相邻两个元素进行比较, 第一次换位,如果符合条件换位,小的往左移动 第二次换位,最后一个数不用参加 以此类推... 总共比较a.length-1次 阅读全文

posted @ 2017-02-22 22:30 chenqr11 阅读(113) 评论(0) 推荐(0)

数组
摘要:数组 一、数组的定义形式 二、数组遍历、最大值和最小值 阅读全文

posted @ 2017-02-22 21:59 chenqr11 阅读(77) 评论(0) 推荐(0)

线程
摘要:多线程 1、什么叫进程?正在运行的程序,如360安全卫士 在某一时刻,cpu进行一个进程,进程可以有多个线程同时进行。 如:在迅雷中,我下载一个文件(进程),文件可以分几个模块同时进行下载(多个线程) 2、什么是线程? 进程中的一个独立的控制单元 需求:如何自定义多线程? 阅读全文

posted @ 2017-02-21 20:24 chenqr11 阅读(86) 评论(0) 推荐(0)

GUI
摘要:一、布局管理器:组件的排放位置 常见布局 FlowLayout(流式布局) 特点:左1,左2 左3 ,左4 BorderLayout(边界式布局) 特点:麻将桌牌式 GridLayout(网格包式布局) 特点:九宫格(计算器) 二、Java包:java.awt 事例: 三、事件监听机制 1、事件源: 阅读全文

posted @ 2017-02-21 17:18 chenqr11 阅读(167) 评论(0) 推荐(0)

IO-字符流的缓冲区
摘要:为什么要用缓冲区?意义在于提高读写效率 对应类 BufferedWriter BufferedReader 缓冲区要结合流来使用,它是在流的基础上加强流的功能 简单说明: 流是水,Buffered是蓄水池。这样就提高了流的操作效率。但是,在操作缓存区前,必须要有流对象 事例:BufferedWrit 阅读全文

posted @ 2017-02-21 14:54 chenqr11 阅读(247) 评论(0) 推荐(0)

io流-day2
摘要:前边已经用到 int read():用于读取单个字符。 需求:定义一个字符数组,用于存储读到字符.(重要) 需求:打印一个.java文件,并打印在控制台上 需求:把demo1.txt的东西写到demo2.txt 改进效率问题以及进行规范的try--catch(重点): 阅读全文

posted @ 2017-02-21 10:11 chenqr11 阅读(131) 评论(0) 推荐(0)

io流
摘要:一、流的分类 按操作数据分:字节流与字符流 按流向分:输出流,输入流 二、IO流常用基类 字节流的抽象基类: InputStream,OutputStream 字符流的抽象基类 Reader writer 三、字符流的特点 1、Writer(抽象基类:意味着要别人来实现) 常用直接子类:FileWr 阅读全文

posted @ 2017-02-20 22:30 chenqr11 阅读(113) 评论(0) 推荐(0)