上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页
package cn.sasa.demo2; import java.util.concurrent.ExecutionException; public class ThreadDemo { public static void main(String[] args) throws InterruptedException, ExecutionException { ... Read More
posted @ 2018-12-29 09:51 SasaL Views(202) Comments(0) Diggs(0) Edit
package cn.sasa.demo1; import java.util.concurrent.ExecutionException; public class ThreadDemo { public static void main(String[] args) throws InterruptedException, ExecutionException { ... Read More
posted @ 2018-12-28 17:25 SasaL Views(227) Comments(0) Diggs(0) Edit
创建线程的第三种方式:实现Callable接口,传入线程池 实现Callable接口中的call方法,可以有返回值,可以抛异常 Read More
posted @ 2018-12-27 15:28 SasaL Views(116) Comments(0) Diggs(0) Edit
package cn.sasa.demo1; public class Test { public static void main(String[] args) throws InterruptedException { /** * 进程: * 进程指正在运行的程序。当一个程序进入内存运行,即变成一个进程 * ... Read More
posted @ 2018-12-27 14:27 SasaL Views(159) Comments(0) Diggs(0) Edit
package cn.sasa.demo4; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStreamReader; import java.io.OutputStreamWriter; public cla... Read More
posted @ 2018-12-25 13:09 SasaL Views(622) Comments(0) Diggs(0) Edit
package cn.sasa.demo3; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class CopyDemo { public static void main(String[] args) { long... Read More
posted @ 2018-12-24 16:14 SasaL Views(202) Comments(0) Diggs(0) Edit
package cn.sasa.demo2; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import javax.management.RuntimeErrorException; public class... Read More
posted @ 2018-12-24 15:14 SasaL Views(169) Comments(3) Diggs(0) Edit
package cn.sasa.demo1; import java.io.File; import java.io.IOException; import java.util.Arrays; public class IODemo { public static void main(String[] args) throws IOException { /*... Read More
posted @ 2018-12-21 16:48 SasaL Views(148) Comments(0) Diggs(0) Edit
package cn.sasa.demo3; public class ParamsDemo { public static void main(String[] args) { //方法的可变参数 同C#的params 关键字 //可变参数只能有一个,并且在参数列表最后 int sum = getSum(1,2,3); ... Read More
posted @ 2018-12-21 10:18 SasaL Views(108) Comments(0) Diggs(0) Edit
package cn.sasa.demo3; import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.Map; import java.util.Set; public class MapDemo { public static void... Read More
posted @ 2018-12-21 10:06 SasaL Views(325) Comments(0) Diggs(0) Edit
上一页 1 ··· 3 4 5 6 7 8 9 10 11 下一页