Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试导入 java.util.concurrent.ThreadLocalRandom 但我收到错误消息“ThreadLocalRandom”无法解决。我检查了属性 - > java编译器下的编译器合规级别,发现它是1.6。我看过 ThreadLocalRandom 是在 1.5 及以上版本中引入的,那为什么导入失败呢?
ThreadLocalRandom已随 Jdk 1.7 发布。浏览文档。