惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

爱范儿
爱范儿
博客园_首页
W
WeLiveSecurity
S
Secure Thoughts
S
Security @ Cisco Blogs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Hugging Face - Blog
Hugging Face - Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
H
Hacker News: Front Page
Project Zero
Project Zero
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
U
Unit 42
N
News and Events Feed by Topic
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
Forbes - Security
Forbes - Security
T
Tor Project blog
I
Intezer
B
Blog
F
Full Disclosure
Security Archives - TechRepublic
Security Archives - TechRepublic
F
Fortinet All Blogs
Schneier on Security
Schneier on Security
T
Threat Research - Cisco Blogs
AI
AI
Google DeepMind News
Google DeepMind News
L
LINUX DO - 最新话题
Cloudbric
Cloudbric
L
Lohrmann on Cybersecurity
WordPress大学
WordPress大学
博客园 - 聂微东
雷峰网
雷峰网
P
Privacy International News Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
PCI Perspectives
PCI Perspectives
Y
Y Combinator Blog
Spread Privacy
Spread Privacy
Simon Willison's Weblog
Simon Willison's Weblog
罗磊的独立博客
Vercel News
Vercel News
A
Arctic Wolf
The Register - Security
The Register - Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Microsoft Azure Blog
Microsoft Azure Blog
H
Heimdal Security Blog
Know Your Adversary
Know Your Adversary
P
Proofpoint News Feed
C
Cybersecurity and Infrastructure Security Agency CISA
P
Proofpoint News Feed

博客园 - 泽来

java多线程---线程之间的通信 设计原则 适配器模式 java小点滴 转>java5.0新特性 面试题收集 我买的书 java编程思想中关于多态性的描述 javascipt正则表达式 - 泽来 - 博客园 javascript小代码 - 泽来 - 博客园 DataGrid数据在Execel中打开 - 泽来 - 博客园 javascript高级教程 智力题收集 asp.net的TextBox回车触发事件 - 泽来 - 博客园 Builder生成器模式 单件模式(singleton) 是男人就坚持100下(强力益智,请留下战绩) XMLHTTP简介 - 泽来 - 博客园 多级无刷新联动(GB2312编码转换为UTF-8未取得满意效果) - 泽来 - 博客园
java复习进程
泽来 · 2006-02-09 · via 博客园 - 泽来

开始:

javac *.java编译
java   *(不要文件扩展名)
super.父类的方法和成员变量
子类中调用父类的构造涵数super()必须放在子类构造函数的第一条语句

引用包文件
import  包名
创建包
Backage 包名

声明成员变量时系统会赋一个初始值,但如果在方法中,就一定要在声明同时初始化.

访问修饰符
缺省的访问修饰符(friendly)只能在同一个包中使用,出了包即使是子类也不能使用.'
作用域 当前类 同一package  不同包中的子孙类 不同package中的非子类
public √ √ √ √
protected √ √ √ ×
friendly √ √ × ×
private √ × × ×
不写时默认为friendly                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             
java中没有goto语句,但可以有标签;标签只能在循环语句外且和循环语句中间不能有任何语句相隔。
可以用continue和breake到标签。  continue到标签后可以重新进入循环而breake后不能重新进入循环。
标签主要用于退出多层循环。
label1:
for(;;)
{
    continue label1;
    breake label1;
}

用了没有new过的类的对象,会出现空指针异常.

抽象类:
凡有抽象方法的类就是一个抽象类,用abstract 修饰.
抽象方法没有方法体,默认为public修饰符.
不能对抽象类进行new操作,有子类抽象类才有意义
abstract和final不能修饰同一个类,final类代表最终类,不能有子类.
Start();  //用来调用run()方法
Sleep(long t);  //t为睡眠的毫秒数

多线程
java.lang.Thread包
在类中扩展(Extends) Thread类, 当程序需要在继承Thread类而又要继承另外的一个类时,可以implements Runnable接口并实现run()方法

进程中所有线程共享同一内存空间.
只有一条线程的进程称为单线程
有不止一个线程的进程称为多线程