Skip to content

Instantly share code, notes, and snippets.

/*제로베이스 BE 35기 김현승*/
public class CounterWithSync {
static int count = 0;
// synchronized 메서드 사용
public synchronized static void increment() {
count++;
}
/*
제로베이스 35기 김현승
*/
package javaEx;
public class ObserverPatternExample {
interface Observer {
void update(String message);
/*
제로베이스 35기 김현승
*/
package javaEx;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.stream.Stream;
/*
제로베이스 35기 김현승
*/
package javaEx;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import java.lang.annotation.ElementType;
@foo158
foo158 / JVM.md
Last active March 30, 2025 01:55

/제로제이스 35기 김현승/ Image Image Image Image Image Image Image Image Image

/*
제로베이스 35기 김현승
*/
package JavaTask;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
/*
제로베이스 35기 김현승
*/
package JavaTask;
import java.util.stream.LongStream;
public class ParallelStreamSumExample {
/*
제로베이스 35기 김현승
*/
package JavaTask;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.concurrent.Executors;
import java.util.concurrent.ScheduledExecutorService;
/*
제로베이스 35기 김현승
*/
package JavaTask;
public class AuthenticationSystem {
private static ThreadLocal<String> userLocal = new ThreadLocal<>();
package JavaTask;
public class ProducerConsumerExample {
// 공유 자원(Buffer) 클래스
private static class Buffer {
private final int capacity;
private final java.util.Queue<Integer> queue = new java.util.LinkedList<>();
public Buffer(int capacity) {