有谁知道我可以通过片段在视觉工作室代码中插入当前日期和时间的方式?
我看过文档,但没有得到任何有关它的信息.
我想创建一个这样的片段:
title: theFileTitle
date: 2016-08-05 09:44:16
Run Code Online (Sandbox Code Playgroud) PS: Sorry for my poor english.I can't describe the problem clearly. :(
When I don't use the "lambda method reference" code style in the static block, like:
static{
map.keySet().parallelStream().forEach(e -> {
System.out.println(e);
});
}
Run Code Online (Sandbox Code Playgroud)
then the program running forever, never stop.
But when I change the code to
static{
map.keySet().parallelStream().forEach(System.out::println);
}
Run Code Online (Sandbox Code Playgroud)
然后该错误消失了。该程序可以立即完成。
请直接看一下代码,我已经尽力简化了代码。
public class BugSimulate {
static {
init();
}
private static void init() {
Map<Integer, String> map = new HashMap<>();
int i = 0;
map.put(++i, "1");
map.put(++i, "1"); …Run Code Online (Sandbox Code Playgroud)