摘要:
Gson 添加依赖: implementation 'com.google.code.gson:gson:2.8.6' 对象的序列化与反序列化 User user = new User("wmj", "666", 24, false); Job teacher = new Job("teacher" 阅读全文
摘要:
CAS CAS 缺点:循环会耗时;一次性只能保持一个共享变量的原子性;ABA问题 package juc.cas; import java.util.concurrent.atomic.AtomicInteger; public class CASDemo { // CAS compareAndSe 阅读全文