多线程
一个进程可以包含多个线程,但至少要有一个线程。 多进程模式:每个进程只有一个线程 多线程模式:一个进程有多个线程 优缺点: 进程比线程开销大、通信慢 多进程比多线程稳定性高 一个java程序就是一个JVM进程,JVM进程用一个主线程来执行<font style="background-color:rgb(248, 249, 250);">main()</font>方法,在<font style="background-color:rgb(248, 249, 250);">main()</font>方法内部又可以启动多个线程。多线程需要同步读取共享数据。 方法一:从<font style="background-color:rgb(248, 249, 250);">Thread</font>派生一个子类,并覆写<font style="background-color:rgb(248, 249, 250);">run...
js关键字
url: post: post(
IO操作
一、File<font style="background-color:rgb(248, 249, 250);">java.io</font>提供了<font style="background-color:rgb(248, 249, 250);">File</font>对象来操作文件和目录。构造<font style="background-color:rgb(248, 249, 250);">File</font>对象时,可以传入绝对路径,也可以传入相对路径。 windows用<font style="background-color:rgb(248, 249, 250);">\</font>作为路径分隔符,java需要用<font style="background-color:rgb(248, 249, 250);">\\</font>表示一个<fo...
