【读书笔记】Java线程
来源:互联网 发布:php 数组弹出第一个 编辑:程序博客网 时间:2024/05/17 21:38
Java线程
第一章 线程简介
- Java术语
- 线程概述
- 为什么要使用线程
- 总结
1.1 Java Terms
- Java
First, is the term Java itself. As you know, Java started out as a programming language, and many people today still think of Java as being simply a programming language. But Java is much more than just a programming language: it's also an API specification and a virtual machine specification. So when we say Java, we mean the entire Java platform: the programming language, its APIs, and a virtual machine specification that, taken together, define an entire programming and runtime environment. Virtual machine, interpreters, and browsers
The Java virtual machine is the code that actually runs a Java program. Its purpose is to interpret the intermediate bytecodes that Java programs are compiled into; the virtual machine is sometimes called the Java interpreter. However, modern virtual machines usually compile the majority of the code they run into native instructions as the program is executing; the result is that the virtual machine does little actual interpretation of code. Browsers such as Mozilla, Netscape Navigator, Opera, and Internet Explorer all have the capability to run certain Java programs (applets). Historically, these browsers had an embedded virtual machine; today, the standard Java virtual machine runs as a plug-in to these browsers.Programs, applications, applets, and other code
Concurrency and threads
J2SE 5.0 includes a package known as the "concurrency utilities," or JSR-166. Concurrency is a broad term. It includes the ability to perform multiple tasks at the same time; we generally refer to that ability as parallelism. As we'll see throughout this book, threaded programming is about more than parallelism: it's also about simpler program design and coping with certain implementation features of the Java platform. The features of Java (including those of JSR-166) help us with these tasks as well. Concurrency also includes the ability to access data at the same time in two or more threads. These are issues of data synchronization, which is the term we use when discussing those aspects of concurrency.
1.2 About the Examples
1.3 Why Threads
One reason that threading is important in Java is that, until JDK 1.4, Java had no concept of asynchronous behavior for I/O. This meant that many of the programming techniques you've become accustomed to using in typical programs were not applicable in Java; instead, until recently, Java programmers had to use threading techniques to handle asynchronous behavior. Another reason is the graphical nature of Java; since the beginning, Java was intended to be used in browsers, and it is used widely in environments with graphical user interfaces. Programmers need to understand threads merely to be able to use the asynchronous nature of the GUI library
- 读书笔记:java线程_1
- 读书笔记:java线程_2
- 读书笔记:java线程_3
- 【读书笔记】Java线程
- 【读书笔记】Java 线程
- java线程读书笔记(1)
- Java读书笔记之线程Stop
- Java中的线程池--读书笔记
- 读书笔记-java网络编程-3线程-java线程概述
- 《java学习笔记》读书笔记のDaemon线程
- 《java并发编程》读书笔记--线程基础
- java并发读书笔记系列--------线程安全
- <Java 并发编程实践>读书笔记 --- 线程封闭
- 读书笔记-java网络编程-3线程-同步
- Thinking in java读书笔记-线程(一)
- 读书笔记-java网络编程-3线程-从线程返回信息
- 读书笔记-java网络编程-3线程-线程调度
- 读书笔记-java网络编程-3线程-线程池和Executor
- sql拆分字符串
- iOS NSString正常显示GBK编码字符
- 使用qml 实现简单的播放器(1)
- CentOS 6.3 下用ntfs-3g挂载Windows NTFS分区
- 矩阵分析(三)内积空间
- 【读书笔记】Java线程
- iOS UIScrollView 停止滑动 减速
- 付款啦关了卡价格
- 基于SWT的Sash和FormLayout的自定义分隔窗体
- android绘制虚线
- 循环处理数据提交
- Qt4.7.4源码自己编译总结red hat x86_64
- 误删除表空间同数据,和dbf数据创建新的关联
- 基于HIVE文件格式的map reduce代码编写