没有合适的资源?快使用搜索试试~ 我知道了~
j2se 非常好的java基础知识整理
资源推荐
资源详情
资源评论
第一章 JAVA 概述: .................................................................................................7
Java 平台的优越性:....................................................................................................7
Java 跨平台的原因.................................................................................................7
Java 的运行方式.....................................................................................................8
JDK 的构成.............................................................................................................8
JAR 包.....................................................................................................................8
java 环境变量的设置.............................................................................................8
java 环境变量的概述......................................................................................8
Linux................................................................................................................9
Windows...........................................................................................................9
4)运行 windows 中的 cmd 窗口,输入如下命令.....................................................9
JAVA 中的常用执行命令.....................................................................................10
jar....................................................................................................................11
第二章 Java 源文件编写规范.....................................................................................11
Java 类名的使用...................................................................................................11
Main 方法..............................................................................................................11
Public static void main(String arg[]){..........................................................................11
Java 中的注释.......................................................................................................12
Java 的命名规范:...............................................................................................12
标识符............................................................................................................12
Java 命名的大小写编程规范:....................................................................13
Java 中的类型................................................................................................13
Boolean 布尔型............................................................................................................14
Char 中的转移字符.....................................................................................................14
A B................................................................................................................................15
局部变量........................................................................................................15
实例变量........................................................................................................15
Java 种的运算符...................................................................................................16
>>> 无符号右移一位 负数移位变成正数.................................................................16
java 中控制语句的使用.......................................................................................17
判断语句 if....................................................................................................17
选择语句 switch()..........................................................................................17
循环控制语句................................................................................................18
第三章 数组的实现.....................................................................................................19
数组概述...............................................................................................................19
数组的声明...........................................................................................................19
数组的创建...........................................................................................................20
数组创建过后的初始值:............................................................................20
初始化数组:................................................................................................20
多维数组:....................................................................................................21
数组拷贝........................................................................................................22
数组的排序....................................................................................................23
第四章 面向对象的思想.............................................................................................23
概述.......................................................................................................................23
方法的定义...........................................................................................................24
方法的实现....................................................................................................24
第五章 封装,继承,多态.........................................................................................27
封装.......................................................................................................................27
继承.......................................................................................................................28
多态.......................................................................................................................29
概述................................................................................................................30
两种复用........................................................................................................30
第六章 static final........................................................................................................31
Final.......................................................................................................................32
修饰方法........................................................................................................33
修饰类............................................................................................................33
第七章 abstract 和 接口..............................................................................................34
Abstract (抽象的)............................................................................................34
接口.......................................................................................................................35
接口的继承....................................................................................................35
接口的意义:................................................................................................36
第八章 java 中的类.....................................................................................................38
object.....................................................................................................................38
Finalize.........................................................................................................................38
Equals....................................................................................................................38
Equals() 覆盖首先要满足的原则:...........................................................................38
封装类...................................................................................................................39
Int i=10;.....................................................................................................................40
Double --------------------(x.toString)------------>String................................................40
Integer -----------------(Integer.valueOf() )----------------> String.................................40
String------------------(Integer.parseInt() )--------------->int..........................................40
//Integer----->Double....................................................................................................40
第九章 内部类.............................................................................................................42
概述.......................................................................................................................42
成员内部类...........................................................................................................42
静态内部类...........................................................................................................43
概述................................................................................................................43
Outer.Inner in=new Outer.Inner();.............................................................................43
System.out.println("run");.........................................................................................44
System.out.println("heart run");................................................................................44
System.out.println("Robot run");..............................................................................44
Robot robot=new Robot();.......................................................................................45
局部内部类...........................................................................................................45
Outer o=new Outer();...............................................................................................45
System.out.println(index);........................................................................................46
Inner i=new Inner();.................................................................................................46
匿名内部类...........................................................................................................46
第十章 异常处理.........................................................................................................48
概述.......................................................................................................................48
Throwable.....................................................................................................................48
Catch(ioexception){}..........................................................................................49
Exception(例外/异常)......................................................................................49
异常的分类....................................................................................................49
Error 和 Exception。....................................................................................................49
Exception 有两个子类:.............................................................................................49
异常的传递....................................................................................................50
异常的处理方式............................................................................................50
Try..catch 捕获异常.......................................................................................51
Catch(IOException e){System.out.println(e.getMessage())};..................................52
开发中的两个道理:....................................................................................52
注意................................................................................................................52
断言是一种调试工具(assert)...................................................................53
Finally{}表示无论有没有异常都会运行的代码。...............................................53
第十一章 集合.............................................................................................................54
集合类...................................................................................................................54
集合的概念....................................................................................................54
Collection 接口(以下介绍其子接口).............................................................55
List 接口的实现类.........................................................................................57
Set 接口的实现类..........................................................................................58
Map 接口的实现类........................................................................................60
总结:............................................................................................................61
第十二章 java 中的图形界面.....................................................................................64
前期知识准备.......................................................................................................64
GUI(图形化的用户接口,为了人机交互使用的。)...........................................64
假如我们需要构造一个图形界面我们需要下面的步骤:........................64
JButton :按钮............................................................................................................65
JRadioButton:单选按钮...............................................................................................65
JMenuBar:菜单条.....................................................................................................65
JSlider:滑动条...........................................................................................................66
JFileChooser:文件选择器.........................................................................................66
awt 事件模型(观察者模式)............................................................................66
C c=new C(this);......................................................................................................67
B b=(B)it.next();.......................................................................................................67
A a=(A)c.getSource();..............................................................................................68
A a1=new A("Event");..............................................................................................68
1,JButton 组件,按钮被点击...................................................................................69
Cs 架构 client server.............................................................................................69
QQ................................................................................................................................69
Awt...............................................................................................................................69
Swing............................................................................................................................70
第十三章 Java 多线程编程.........................................................................................71
Java 多线程编程...................................................................................................71
前期知识........................................................................................................71
线程编程的两种方法....................................................................................72
Thread t=new a();......................................................................................................72
Runable r=new b();//目标对象.................................................................................72
Thread t=new Thread(r);//用目标对象构造线程对象.............................................73
Thread 的方法..............................................................................................................73
Try...............................................................................................................................73
Thread.sleep(1000);..................................................................................................73
Class Gril......................................................................................................................75
Class Boy extends Thread............................................................................................75
线程的七种状态...................................................................................................78
初始状态........................................................................................................78
多线程的同步.......................................................................................................78
互斥锁标记 ................................................................................................78
锁池状态........................................................................................................79
线程间的通信.......................................................................................................79
Notify...........................................................................................................................79
第十四章 标准 I/O 流与文件......................................................................................80
标准 I/O 流与文件................................................................................................80
常用的 File 类的方法...........................................................................................81
处理跨平台性.......................................................................................................82
Java 中的 I/O..................................................................................................82
第十五章 序列化.........................................................................................................90
ObjectInputStream 和 ObjectOutputStream(对象流)......................................90
Object o = new Object();..........................................................................................90
FileOutputStream fos=new FileOutputStream("Object.txt");..................................90
FileInputStream fis =new FileInputStream(“Object.txt”);.......................................90
ObjectInputStream ois =new ObjectInputStream(fis);.............................................90
注意:...................................................................................................................91
StringTokenizer(参数 1,参数 2)按某种符号隔开文件.......................................91
第十六章 java 中的网络编程......................................................................................92
知识点准备...........................................................................................................92
网络基础知识................................................................................................92
TCP/IP 模型..........................................................................................................94
TCP Socket.....................................................................................................95
UDP socket.....................................................................................................97
第十七章 JDK5.0 新特性............................................................................................98
自动装箱和自动拆箱...........................................................................................99
Integer i=1;相当于 Integer i=new Integer(1);........................................................99
<5.0 之前>......................................................................................................99
Integer i=new Integer(4); ...................................................................................99
<5.0 之后>......................................................................................................99
Integer i=4;................................................................................................................99
静态引入...............................................................................................................99
Math.sqrt(Math.pow(x, 2) + Math.pow(y, 2));........................................................100
增强的 for 循环( for each ).................................................................................100
System.out.println("曾经的风化绝代:" + b);........................................................101
System.out.println("曾经的青史留名:" + b);.........................................................101
Foreach each = new Foreach();...............................................................................101
String b = belle[i];..................................................................................................101
System.out.println("曾经的青史留名:" + b);........................................................101
String name = (String) it.next();.............................................................................101
System.out.println("曾经的风化绝代:" + b);........................................................102
for each 的缺点:........................................................................................102
可变长的参数.....................................................................................................102
System.out.println("m(String)" +s);.......................................................................102
System.out.println(s2);...........................................................................................102
格式化输出.........................................................................................................103
类型安全的枚举.................................................................................................103
<在 5.0 之前使用模式做出枚举>...............................................................104
<在 5.0 中使用模式做出枚举>...................................................................104
SPRING(..),//枚举值.................................................................................................104
SPRING(“春”),-------------------------------逗号.........................................................105
SUMMER(“夏”),-------------------------------逗号.....................................................105
WINTER(“冬”);-------------------------------分号....................................................105
Season2.SPRING.getName()---------------------春.....................................................105
ADD..........................................................................................................................105
SUBSTRACT............................................................................................................105
MULTIPLY...............................................................................................................105
DIVIDE.....................................................................................................................106
泛型.....................................................................................................................106
实现 java 中的模板编程..............................................................................106
java5.0 中的泛型.........................................................................................107
List<Integer> aList = new ArrayList<Integer>();...................................................107
Integer myInteger = aList.get(0);............................................................................107
HashMap<String,Float> hm = new HashMap<String,Float>();.............................108
GenList<int> nList = new GenList<int>(); //编译错误.........................................108
Element temp = this.get(i);......................................................................................108
MyList<String> list = new MyList<String>();......................................................109
System.out.println(list.get(0) + " " + list.get(1));...................................................109
List<String> l1=new ArrayList<String>();............................................................109
System.out.println(a);.............................................................................................111
// IOException or a subtype of...................................................................................113
System.out.println("IOException: " + ioe);............................................................113
7,泛型类不能继承自 Throwable 以及其子类.......................................................113
第十八章 反射和注释...............................................................................................114
反射.....................................................................................................................114
获得类对象的三种方式:(类对象不用 new 的方法得到的)..............114
剩余63页未读,继续阅读
资源评论
mu289462602
- 粉丝: 0
- 资源: 32
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功