1 package simulation; 2 3 import java.util.Random; 4 5 class Vehicle implements Runnable{ 6 private int id; 7 private static TollBooth toll =new TollB ...
分类:
编程语言 时间:
2018-05-24 10:30:11
阅读次数:
235
package serializable; import java.io.Serializable; public class TestOne implements Serializable{ private static final long serialVersionUID = 1L; /** ... ...
分类:
其他好文 时间:
2018-05-24 01:11:10
阅读次数:
163
以下都是有缺陷的。 1 private static T BinDeepCopy<T>(T t) 2 { 3 using(var ms = new MemoryStream()) { 4 var bf = new BinaryFormatter(); 5 bf.Serialize(ms,t); 6 ...
分类:
其他好文 时间:
2018-05-23 14:24:13
阅读次数:
230
1 delegate int runDelegate(string name); 2 static runDelegate run= new runDelegate(Calc); 3 static int count = 0; 4 private static int Calc(string nam ...
public class App extends Application { private static List<Activity> lists = new ArrayList<>(); public static void addActivity(Activity activity) { li ...
分类:
其他好文 时间:
2018-05-23 13:48:17
阅读次数:
258
public class WebSocketClientCache { private static ConcurrentHashMap channelsMap = new ConcurrentHashMap(); //心跳 1 已发送 private static ConcurrentHashMa... ...
分类:
Web程序 时间:
2018-05-22 22:26:38
阅读次数:
452
JDK源码如是说: ThreadLocal类用来提供线程内部的局部变量。这种变量在多线程环境下访问(通过get或set方法访问)时 能保证各个线程里的变量相对独立于其他线程内的变量。ThreadLocal实例通常来说都是private static类型的, 用于关联线程和线程的上下文。 Thread ...
分类:
其他好文 时间:
2018-05-19 10:35:19
阅读次数:
132
@Slf4j public class SimpleHappenBefore { private static int a = 0; private static boolean flag = false; public static void main(String[] args) throws ... ...
分类:
编程语言 时间:
2018-05-18 14:12:48
阅读次数:
203
在 SpringBoot 中使用 十分简单,只需在方法上加上 注释即可。 `fixedRateString initialDelayString String` 的意义 源码位置: private static long parseDelayAsLong(String value) throws R ...
分类:
编程语言 时间:
2018-05-16 15:23:45
阅读次数:
447
一.https忽略证书 二.post与get请求 /** * 利用HttpClient的工具类 * * @author Joey * */ public class HttpClientUtil { private static String charSet = "UTF-8"; private s ...
分类:
Web程序 时间:
2018-05-15 15:00:27
阅读次数:
317