콘텐츠로 이동

C언어나 C++ 에서는 함수에 포인터형태로 함수의 주소만 전달하면 되는데, 자바나 파이썬 같은 경우는 어떻게 처리되는거지

함수 포인터와 다른 언어의 동등한 개념에 대한 비교를 설명해 드리겠습니다.

C/C++에서의 함수 포인터

C와 C++에서는 함수 포인터를 통해 함수 자체를 다른 함수에 전달할 수 있습니다. 함수 포인터는 함수의 메모리 주소를 가리키며, 이를 통해 런타임에 호출할 함수를 결정할 수 있습니다1.

// 함수 포인터 선언
double (*pf)(int);  // int를 매개변수로 받고 double을 반환하는 함수 포인터
pf = someFunction;  // 함수 주소 할당
result = pf(5);     // 함수 포인터를 통한 호출

C/C++에서는 함수 이름이 함수의 주소로 작동하므로, 함수 이름을 직접 인자로 전달하면 됩니다1.

Python에서의 함수 처리

Python에서는 함수가 일급 객체(first-class object)로 취급됩니다. 즉, 함수 자체를 변수에 할당하거나 다른 함수의 인자로 전달할 수 있습니다.

def execute_function(func, arg):
    return func(arg)

def double(x):
    return x * 2

result = execute_function(double, 5)  # 함수 객체를 직접 전달

Python에서는 C/C++처럼 주소를 명시적으로 전달할 필요 없이, 함수 이름 자체가 함수 객체를 참조합니다. 이것은 내부적으로 Python이 함수를 객체로 관리하기 때문입니다.

또한 Python은 람다 함수와 functools 모듈을 통해 함수형 프로그래밍 기능을 제공합니다:

execute_function(lambda x: x * 2, 5)  # 익명 함수 전달

Java에서의 함수 처리

Java에서는 Java 8 이전에는 함수를 직접 전달할 수 없었으며, 인터페이스와 익명 클래스를 사용했습니다:

// Java 7 이전
interface Calculator {
    double calculate(int value);
}

void executeFunction(Calculator calc, int arg) {
    return calc.calculate(arg);
}

// 사용 예
executeFunction(new Calculator() {
    public double calculate(int value) {
        return value * 2;
    }
}, 5);

Java 8부터는 함수형 인터페이스(Functional Interface)와 람다 표현식을 도입했습니다:

// Java 8 이상
@FunctionalInterface
interface Calculator {
    double calculate(int value);
}

void executeFunction(Calculator calc, int arg) {
    return calc.calculate(arg);
}

// 람다 표현식 사용
executeFunction(value -> value * 2, 5);

// 메소드 참조 사용
executeFunction(SomeClass::doubleIt, 5);

Java 8은 또한 java.util.function 패키지에 표준 함수형 인터페이스를 제공합니다(Function, Consumer, Supplier 등).

차이점 요약

  • C/C++: 함수의 메모리 주소를 직접 다루며, 함수 포인터 구문이 복잡할 수 있음1
  • Python: 함수를 일급 객체로 취급하여 쉽게 전달하고 호출할 수 있음
  • Java: Java 8 이전에는 인터페이스를 통해 간접적으로 처리, Java 8 이후에는 함수형 인터페이스와 람다 표현식으로 보다 간결하게 처리

기본적으로 세 언어 모두 함수를 인자로 전달하고 나중에 호출할 수 있는 메커니즘을 제공하지만, 구현 방식과 문법이 다릅니다. C/C++은 저수준 메모리 주소를 직접 다루는 반면, Python과 Java는 객체 지향적이고 추상화된 방식을 취합니다.


자바 메서드 참조와 인스턴스 참조

메서드 참조(Method References)는 자바에서 람다식보다 더 간결하게 함수 객체를 생성하는 방법입니다. 메서드 참조가 동작하는 방식은 참조 유형에 따라 달라집니다.

메서드 참조의 종류와 작동 방식

자바의 메서드 참조에는 다섯 가지 유형이 있고, 각각 다르게 동작합니다65:

1. 정적 메서드 참조(Static method references)

Integer::parseInt  // 람다 등가식: str -> Integer.parseInt(str)

이 경우 특정 인스턴스가 아닌 클래스의 정적 메서드를 참조합니다.

2. 바운드 인스턴스 메서드 참조(Bound instance method references)

Instant.now()::isAfter  // 람다 등가식: t -> Instant.now().isAfter(t)

여기서는 특정 객체 인스턴스(Instant.now()가 반환한 객체)의 메서드를 참조합니다. 이 경우 실제로 해당 인스턴스의 주소값을 가지고 있으며, 이후에 메서드가 호출될 때 그 주소값에 있는 인스턴스의 메서드가 호출됩니다65.

3. 언바운드 인스턴스 메서드 참조(Unbound instance method references)

String::toLowerCase  // 람다 등가식: str -> str.toLowerCase()

이 유형은 특정 인스턴스가 아닌 클래스의 인스턴스 메서드를 참조합니다. 메서드가 호출될 때 첫 번째 매개변수로 인스턴스가 제공됩니다65.

4. 클래스 생성자 참조(Class constructor references)

TreeMap<K,V>::new  // 람다 등가식: () -> new TreeMap<K,V>()

5. 배열 생성자 참조(Array constructor references)

int[]::new  // 람다 등가식: len -> new int[len]

인스턴스 주소값 사용

질문에 대한 직접적인 답변으로, 바운드 인스턴스 메서드 참조의 경우에는 맞습니다. 이미 존재하는 인스턴스의 주소값만을 가지고 와서 해당 인스턴스의 메서드를 호출하는 데 사용됩니다65.

예를 들어:

Button saveButton = new Button("Save");
actionEvents.forEach(saveButton::handleEvent);

이 코드에서 saveButton::handleEvent는 saveButton 객체의 참조(주소값)를 저장하고 있으며, 이벤트가 발생할 때마다 그 참조를 통해 handleEvent 메서드를 호출합니다.

따라서 바운드 메서드 참조는 새로운 객체를 생성하지 않고 기존 인스턴스의 참조만 유지합니다65. 이는 람다식이 해당 메서드에 단순히 위임하는 경우 더 간결한 구문을 제공하기 위한 것입니다.

단, 정적 메서드 참조나 언바운드 인스턴스 메서드 참조의 경우는 인스턴스 자체의 주소를 저장하지 않고, 메서드를 호출할 때 인스턴스가 제공되거나 정적 메서드이므로 인스턴스가 필요하지 않습니다65.


자바 메모리 관리 메커니즘: 객체 생성부터 가비지 컬렉션까지의 심층 분석

자바 런타임 환경에서의 메모리 관리는 개발자에게 투명하게 처리되지만, 고성능 애플리케이션 구현을 위해서는 그 내부 동작 원리를 정확히 이해해야 합니다. 본 연구는 인스턴스 생성 시 메모리 구조 변화, 가비지 컬렉션(GC)의 작동 메커니즘, 람다 함수의 메모리 할당 전략 등을 종합적으로 분석합니다.

1. 자바 메모리 아키텍처의 계층적 구조

1.1 스택 영역의 동적 관리

스레드별로 독립적인 스택 프레임이 생성되며, 지역 변수와 메서드 호출 정보를 저장합니다. 다음 코드 실행 시 메모리 변화를 관찰할 수 있습니다:

public class MemoryDemo {
    public static void main(String[] args) {
        int baseValue = 100;  // 스택에 primitive 값 직접 저장
        Calculator calc = new ScientificCalculator();  // 참조 변수 스택 저장
        int result = calc.compute(baseValue);  // 새로운 스택 프레임 생성
    }
}

이때 calc 참조 변수는 스택에 4바이트(32-bit JVM) 또는 8바이트(64-bit JVM) 공간을 차지하며, 실제 객체는 힙에 할당됩니다104.

1.2 힙 영역의 객체 생명주기

모든 객체 인스턴스와 배열은 힙 영역에 저장되며, 세대별 가비지 컬렉션의 주요 관리 대상입니다:

// 객체 생성 프로세스
Object obj = new CustomObject(); 
// 1. Eden 영역에 12바이트(헤더 8바이트 + 데이터 4바이트) 할당 시도
// 2. 공간 부족 시 Minor GC 실행
// 3. Survivor 영역 이동 후 age 값 증가
// 4. tenure threshold 도달 시 Old Generation으로 승격

JVM은 객체 헤더에 Mark Word(8바이트)와 Klass Pointer(4바이트)를 저장하여 GC 및 타입 정보를 관리합니다101107.

2. 가비지 컬렉션의 다층적 작동 메커니즘

2.1 세대별 수집 전략

  • Young Generation: Copy 알고리즘 사용, Stop-The-World 시간 최소화
  • Old Generation: Mark-Sweep-Compact 알고리즘 적용, 메모리 단편화 방지
  • Metaspace: Native 메모리 영역에서 자동 확장 관리

GC 로그 분석 예시:

[GC pause (G1 Evacuation Pause) 
  Young: 45M->0M(2048M) 
  Old: 102M->145M(4096M) 
  Metaspace: 85M->85M(1056768K)]

2.2 참조 추적의 한계와 메모리 누수

GC가 무력화되는 전형적인 사례 분석:

public class ListenerLeak {
    private static List<EventListener> listeners = new ArrayList<>();

    public void register(EventListener l) {
        listeners.add(l);  // 정적 컬렉션이 객체 유지
    }
}
// 등록된 리스너는 애플리케이션 생명주기 동안 GC되지 않음

WeakReference와 ReferenceQueue를 이용한 해결 방안:

WeakReference<ExpensiveObject> weakRef = 
    new WeakReference<>(new ExpensiveObject(), refQueue);

3. 람다 표현식의 메모리 관리 특성

3.1 캡처 변수의 메모리 바인딩

람다식이 외부 변수를 캡처할 때 발생하는 메모리 할당 패턴:

public class LambdaScope {
    public Runnable createTask() {
        int[] counter = new int[^3_1];  // 힙에 할당된 배열 객체
        return () -> counter[^3_0]++;   // 배열 참조 유지
    }
}
// counter 배열은 람다 인스턴스와 함께 생존

이 경우 내부적으로 counter 배열을 포함하는 synthetic 클래스가 생성되어 힙에 저장됩니다110.

3.2 메서드 참조의 주소 바인딩

바운드 인스턴스 메서드 참조의 메모리 처리:

public class Processor {
    public void process() {
        DataFilter filter = new DataFilter();
        IntStream.range(0,100)
                 .filter(filter::isValid)  // filter 인스턴스 참조 유지
                 .count();
    }
}
// filter 객체는 GC 대상에서 제외

이 구현에서는 filter 인스턴스가 스택에서 힙으로 참조가 이동하며, 람다 실행 컨텍스트에 저장됩니다105111.

4. 문자열 상수 풀의 최적화 전략

4.1 인터닝 메커니즘

String s1 = "Java";  // 풀에 새 항목 생성
String s2 = "Java";  // 기존 풀 항목 재사용
String s3 = new String("Java");  // 힙에 별도 객체 생성

System.out.println(s1 == s2);         // true
System.out.println(s1 == s3);         // false
System.out.println(s1.equals(s3));    // true

String.intern() 메서드를 사용하면 수동으로 풀 관리 가능하나, 과도한 사용은 PermGen 공간 부족을 유발할 수 있습니다103104.

4.2 최신 JVM의 문자열 처리

Java 8 이후 문자열 풀은 힙 영역으로 이동되어 GC 대상이 되며, G1 GC의 문자열 중복 제거 기능으로 메모리 사용 효율이 개선되었습니다.

5. 메모리 관리 최적화 기법

5.1 객체 풀링 패턴

public class ObjectPool<T> {
    private Queue<T> pool = new ConcurrentLinkedQueue<>();

    public T borrowObject() {
        T obj = pool.poll();
        return (obj != null) ? obj : createObject();
    }

    public void returnObject(T obj) {
        pool.offer(obj);
    }
}
// 빈번한 생성/파괴가 필요한 객체에 적용

5.2 오프-힙 메모리 활용

Direct ByteBuffer 사용 사례:

ByteBuffer buffer = ByteBuffer.allocateDirect(1024 * 1024);  // 네이티 메모리 할당
// 사용 후 명시적 해제 필요
((DirectBuffer) buffer).cleaner().clean();

6. GC 의존적 시스템의 잠재적 위험요소

6.1 예측 불가능한 지연 시간

실시간 시스템에서의 GC 문제점:

  • Stop-The-World 시간이 200ms 초과 시 심각한 서비스 장애
  • CMS GC 사용 시 조각화 누적으로 인한 Full GC 발생 가능성

6.2 메모리 사용량 증폭 현상

과도한 객체 보존으로 인한 문제:

public class CachedData {
    private static Map<String, Data> cache = new HashMap<>();

    public void process(String key) {
        Data data = computeExpensively(key);
        cache.put(key, data);  // 캐시 관리 전략 없이 무제한 저장
    }
}
// 시간 경과에 따라 OOM 발생 확률 증가

LRU(Least Recently Used) 캐시 구현으로 해결:

LinkedHashMap<String, Data> cache = new LinkedHashMap<>(100, 0.75f, true) {
    protected boolean removeEldestEntry(Map.Entry eldest) {
        return size() > MAX_ENTRIES;
    }
};

7. 고급 메모리 분석 기법

7.1 Java Flight Recorder 활용

JFR을 통한 메모리 할당 추적:

jcmd <pid> JFR.start duration=60s filename=memory.jfr

7.2 Native Memory Tracking

JVM 자체의 메모리 사용 분석:

-XX:NativeMemoryTracking=summary
jcmd <pid> VM.native_memory

이 연구 결과는 자바 기반 시스템의 메모리 사용 패턴 최적화와 안정성 향상에 기여할 것으로 기대됩니다. 메모리 관리 전략은 애플리케이션의 도메인 특성과 런타임 환경을 종합적으로 고려하여 수립되어야 합니다.


  1. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/446aa07e-eae6-49b1-9886-760d46870ca2/Developer-s-Library-Stephen-Prata-C-Primer-Plus-2011-Addison-Wesley.pdf 

  2. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/4cbdfe52-8fa8-4cff-a5ed-0aab0da26234/Elecia-White-Making-Embedded-Systems_-Design-Patterns-for-Great-Software-2024-OReilly-Media.pdf 

  3. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/c9635d0e-5c34-4fd5-97a6-5096b228cb99/blackhatpython.pdf 

  4. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/8f689146-0bba-4946-8265-2bc0d3191d2b/Kenneth-C.-Louden-Kenneth-A.-Lambert-Programming-Languages_-Principles-and-Practices-2011-Course-Technology.pdf 

  5. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/2f1f312f-508b-486e-a57b-b9c5b4f52f90/Joshua-Bloch-Effective-Java-2018-Addison-Wesley-Professional.pdf 

  6. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/0040e566-2526-4ff3-a5f6-f9bd551e5965/Ramez-Elmasri-Shamkant-B.-Navathe-Fundamentals-of-Database-Systems-2015-Pearson.pdf 

  7. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/55b11993-e089-453a-9dac-9450efd92879/Arora-Jatin-Grokking-The-Java-Developer-Interview_-More-Than-200-Questions-To-Crack-The-Java-Spring-SpringBoot-Hibernate-Interview-2020.pdf 

  8. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/54a4ce42-29ba-44af-902d-d4b388c1164c/Gray-Hat-Python.pdf 

  9. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/5c2969e0-688a-4775-89ea-a7c669db80dd/attackingnetworkprotocols_ebook.pdf 

  10. https://www.reddit.com/r/javahelp/comments/7n7uch/do_pointers_in_java_exist/ 

  11. https://www.robmiles.com/journal/2018/9/27/pointers-to-functions-in-c-and-python 

  12. https://stackoverflow.com/questions/1073358/function-pointers-in-java 

  13. https://docs.python.org/3/library/ctypes.html 

  14. https://www.gregorygaines.com/blog/how-to-use-function-pointers-in-java/ 

  15. https://programming.guide/java/function-pointers-in-java.html 

  16. https://www.semanticscholar.org/paper/a208fb73ccdc59722dfad0dfb1a5268374c777a0 

  17. https://www.semanticscholar.org/paper/10c300c46f438419469f60bb20da19b2cf5bfedf 

  18. https://www.semanticscholar.org/paper/cb0f267cdc86b602eb53318acae6b6c7d667ac31 

  19. https://www.semanticscholar.org/paper/5b55a031cf33f285170568fcf44f4a006d20ecc2 

  20. https://www.reddit.com/r/javahelp/comments/pwuj0d/is_there_a_java_equivalent_for_this_line_of_code/ 

  21. https://www.reddit.com/r/gamemaker/comments/44ozd6/gml_pointers_or_equivalent/ 

  22. https://www.reddit.com/r/Cplusplus/comments/d6i2c8/what_is_the_c_equivalent_of_the_function/ 

  23. https://www.reddit.com/r/java/comments/2seggq/is_java_passbyvalue_or_passbyreference/ 

  24. https://www.reddit.com/r/cpp/comments/qquqxo/equivalent_of_java_atomicmarkablereference/ 

  25. https://www.javamex.com/java_equivalents/pointers.shtml 

  26. https://coderanch.com/t/322224/java/Function-Pointer-Java 

  27. https://www.ncbi.nlm.nih.gov/pmc/articles/PMC11949583/ 

  28. https://www.semanticscholar.org/paper/6bc33569cb9ea5561cce46c80e1355d312fcf143 

  29. https://www.semanticscholar.org/paper/35a62875fde8112a21dd09f2c2df26fb93788168 

  30. https://www.semanticscholar.org/paper/0970a0c5cf3de5b795c5d37a82f9b02872813601 

  31. https://www.reddit.com/r/learnpython/comments/uca82r/you_can_use_pointers_in_python/ 

  32. https://www.reddit.com/r/C_Programming/comments/12jglg5/recursively_typedef_a_function_pointer/ 

  33. https://www.reddit.com/r/C_Programming/comments/njqk06/newbie_question_is_there_an_equivalent_of_class/ 

  34. https://www.reddit.com/r/cpp/comments/cm2g4l/python_function_decorators_in_modern_c_without/ 

  35. https://discuss.python.org/t/how-to-pass-a-python-function-to-a-c-function-as-a-function-pointer-in-cython/45286 

  36. https://github.com/wjakob/nanobind/discussions/616 

  37. https://www.semanticscholar.org/paper/a12c5b634113fc65b5861458fe9a87853afc2f28 

  38. https://www.semanticscholar.org/paper/ac9ed00eaf29e64a466abe70ac846b2a36e8510e 

  39. https://www.semanticscholar.org/paper/3e43335f0f0ddd49581ec2b13171e64b06fb79f8 

  40. https://www.semanticscholar.org/paper/b040a7f787ece04ce89c149b3578fc0a9059a633 

  41. https://arxiv.org/abs/2304.12034 

  42. https://www.semanticscholar.org/paper/df4bc310e9cfacb76722d687b5d6a7550d091e52 

  43. https://www.reddit.com/r/learnprogramming/comments/17qb938/is_java_just_c_without_pointers/ 

  44. https://www.reddit.com/r/ProgrammingLanguages/comments/ukjhby/what_are_the_use_cases_for_pointers/ 

  45. https://www.reddit.com/r/javahelp/comments/15jy63h/methods_vs_functions_in_java/ 

  46. https://www.reddit.com/r/C_Programming/comments/kt1heh/designing_for_unit_tests/ 

  47. https://javarush.com/ko/groups/posts/ko.3809.html 

  48. https://isocpp.org/wiki/faq/pointers-to-members 

  49. https://javajazzle.wordpress.com/2011/03/24/equivalent-of-function-pointers-of-c-in-java/ 

  50. https://www.semanticscholar.org/paper/91fddfdec15c88133b9d7eadf938e1846b1957f1 

  51. https://www.semanticscholar.org/paper/cfc973d2ad950c4b2d5fa6a40c3e1a01b222f5a2 

  52. https://pubmed.ncbi.nlm.nih.gov/39463085/ 

  53. https://www.semanticscholar.org/paper/54741648eb298dec38baff0c62eb9ee1a92f1ca3 

  54. https://www.semanticscholar.org/paper/a08e178893ac78baa814eb58aaf752ae334358e7 

  55. https://www.reddit.com/r/learnpython/comments/12uk5b1/why_doesnt_python_have_pointers/ 

  56. https://www.reddit.com/r/learnpython/comments/11jgc5n/looking_for_pointer_like_functionality_in_python/ 

  57. https://www.reddit.com/r/cprogramming/comments/1jcwk8h/why_can_we_pass_functions_as_a_parameter_to_other/ 

  58. https://www.reddit.com/r/cpp_questions/comments/16es368/when_to_use_a_lambda_over_a_function_pointer/ 

  59. https://www.reddit.com/r/learnpython/comments/mptn9x/how_do_pointers_work_in_python/ 

  60. https://www.reddit.com/r/C_Programming/comments/1evrea6/do_asterisk_and_ampersand_change_the_meaning_of/ 

  61. https://stackoverflow.com/questions/2283210/python-function-pointer 

  62. https://blog.naver.com/rupy400/130103870372 

  63. https://realpython.com/pointers-in-python/ 

  64. https://groups.google.com/g/cython-users/c/0ouYUUa60R4 

  65. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/2f1f312f-508b-486e-a57b-b9c5b4f52f90/Joshua-Bloch-Effective-Java-2018-Addison-Wesley-Professional.pdf 

  66. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/cfc0dcdf-0cf6-45ae-ad4b-e80c8e828b3e/Webdav-yeongyeol-bangbeob.pdf 

  67. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/8f689146-0bba-4946-8265-2bc0d3191d2b/Kenneth-C.-Louden-Kenneth-A.-Lambert-Programming-Languages_-Principles-and-Practices-2011-Course-Technology.pdf 

  68. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/2730d3e1-6111-4b5f-8c23-94645665794a/Tayo-Koleoso-Beginning-jOOQ-Learn-to-Write-Efficient-and-Effective-Java-Based-SQL-Database-Operations-2022-Apress-10.1007_978-1-4842-7431-6.pdf 

  69. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/e2dc3330-79ef-4792-9707-c10ab3c46a28/Ben-Clark-Nick-Downer-RTFM_-Red-Team-Field-Manual-v2-2022-Independently-Published.pdf 

  70. https://ppl-ai-file-upload.s3.amazonaws.com/web/direct-files/collection_e4c03f8c-78b0-486b-80e6-a3e2e707a108/55b11993-e089-453a-9dac-9450efd92879/Arora-Jatin-Grokking-The-Java-Developer-Interview_-More-Than-200-Questions-To-Crack-The-Java-Spring-SpringBoot-Hibernate-Interview-2020.pdf 

  71. https://www.reddit.com/r/java/comments/xlrth2/subtle_difference_between_lambda_and_method/ 

  72. https://www.geeksforgeeks.org/method-references-in-java-with-examples/ 

  73. https://www.codementor.io/@eh3rrera/using-java-8-method-reference-du10866vx 

  74. https://www.danvega.dev/blog/java-method-references 

  75. https://dev.to/ggorantala/what-are-java-method-references-and-kinds-of-method-references-available-d34 

  76. https://coderanch.com/t/725186/java/Method-references-Instance-Methods-class 

  77. https://arxiv.org/abs/2412.08029 

  78. https://www.semanticscholar.org/paper/971c7a1674b0d77745e3d6f9fde0b33144b52709 

  79. https://arxiv.org/abs/2409.02543 

  80. https://www.semanticscholar.org/paper/0a47e7c7bc22a03c286b928222768a5a6ca5502e 

  81. https://www.reddit.com/r/learnjava/comments/zux7x6/help_me_understand_java_documentation/ 

  82. https://www.reddit.com/r/Kotlin/comments/6r7sv1/what_are_the_biggest_gotchas_when_beginning_kotlin/ 

  83. https://www.reddit.com/r/javahelp/comments/10x73ln/when_do_you_know_when_to_use_an_instance_variable/ 

  84. https://www.reddit.com/r/learnjava/comments/rb20ma/new_to_java_why_rename_variables_in_classes/ 

  85. https://futurecreator.github.io/2018/08/02/java-lambda-method-references/ 

  86. https://www.baeldung.com/java-method-references 

  87. https://jaehoney.tistory.com/111 

  88. https://www.semanticscholar.org/paper/1f288c0a7a3ccf6c62e8e9b62a235f841e6db06d 

  89. https://arxiv.org/abs/2301.01156 

  90. https://www.semanticscholar.org/paper/0c833b1eb6c69308751f179e4d51464c78b93217 

  91. https://www.semanticscholar.org/paper/901311f9783761b99ab439067a8e976606914828 

  92. https://www.semanticscholar.org/paper/178e622aed2063d939281e31dd2a5062f8f9ae42 

  93. https://arxiv.org/abs/2304.06928 

  94. https://www.reddit.com/r/java/comments/14vpgkv/how_does_java_type_check_a_program_containing/ 

  95. https://www.reddit.com/r/programming/comments/k9h3s/java_8_lambda_syntax_decided_finally_similar_to_c/ 

  96. https://www.reddit.com/r/javahelp/comments/1yh6s5/jna_native_api_base_address_calculation/ 

  97. https://www.reddit.com/r/Kotlin/comments/169bdgo/can_i_define_every_method_as_a_run_lambda/ 

  98. https://www.reddit.com/r/Kotlin/comments/xrw6bu/whats_the_difference_between_using_function_types/ 

  99. https://stackoverflow.com/questions/25512532/instance-method-reference-and-lambda-parameters 

  100. https://www.semanticscholar.org/paper/38728f5aff0712be664873e827c935afc53af8a1 

  101. https://velog.io/@023-dev/Garbage-Collection-e4inymls 

  102. https://docs.aws.amazon.com/ko_kr/lambda/latest/dg/configuration-memory.html 

  103. https://code-lab1.tistory.com/130 

  104. https://inpa.tistory.com/entry/JAVA-☕-그림으로-보는-자바-코드의-메모리-영역스택-힙 

  105. https://yooniron.tistory.com/14 

  106. https://bangu4.tistory.com/215 

  107. https://j-dong.tistory.com/13 

  108. https://www.semanticscholar.org/paper/6e2e4ea3beb748567cfb918cac3b4a850b3c6d56 

  109. https://www.semanticscholar.org/paper/0a1b9616606583285f82f91228bc633dea3a8260 

  110. https://lordofkangs.tistory.com/362 

  111. https://www.semanticscholar.org/paper/baae22e3ed788e97189c95e1a1c3b293b622452a 

  112. https://www.semanticscholar.org/paper/5c185f0985082cf4fc401b2bf348be62969f4188 

  113. https://www.semanticscholar.org/paper/3ac146674f57e8214e52e40e180f6a062023e29e 

  114. https://www.reddit.com/r/KoreanYouTubeTrends/rising/ 

  115. https://velog.io/@falling_star3/Java-JVM-메모리구조-암기-말고-이해하기상속을-곁들인 

  116. https://brunch.co.kr/@mystoryg/51 

  117. https://www.semanticscholar.org/paper/3a288e10164bf16fc4537b58f77c95f1b6a4a0bb 

  118. https://www.semanticscholar.org/paper/0557624caa1a8c4a60013098abe30927c8933aa8 

  119. https://www.semanticscholar.org/paper/f1c9f2061eb7a87333d47af622204bfa0c663ea4 

  120. https://lucas-owner.tistory.com/38 

  121. https://h-yeon00.tistory.com/16 

  122. https://blog.naver.com/heartflow89/220954420688 

  123. https://happygrammer.github.io/dev/java/understanding-jvm-memory-structure/ 

  124. https://yaboong.github.io/java/2018/06/09/java-garbage-collection/ 

  125. https://sd0309.tistory.com/5 

  126. https://blog.naver.com/byteu/221888714209 

  127. https://velog.io/@nyoung215/자바-메모리-구조-static-heap-stack 

  128. https://hwanghub.tistory.com/756 

  129. https://loosie.tistory.com/851 

  130. https://devkingdom.tistory.com/272 

  131. https://blog.naver.com/minsuk0123/44865799 

  132. https://velog.io/@b2b2004/Java-메모리-구조Method-Stack-Heap 

  133. https://ttmcr.tistory.com/entry/Java-자바-메모리-구조-아주-쉽게-정리그림 

  134. https://steady-coding.tistory.com/304 

  135. https://bambookim.tistory.com/18 

  136. https://dev-kani.tistory.com/38 

  137. https://khj93.tistory.com/entry/JAVA-람다식Rambda란-무엇이고-사용법 

  138. https://lealea.tistory.com/273 

  139. https://brightstarit.tistory.com/30 

  140. https://dreamchaser3.tistory.com/5 

  141. https://docs.aws.amazon.com/ko_kr/lambda/latest/dg/java-layers.html 

  142. https://inpa.tistory.com/entry/JAVA-☕-가비지-컬렉션GC-동작-원리-알고리즘-💯-총정리 

  143. https://velog.io/@jhw970714/익명-클래스와-람다Lambda 

  144. https://docs.aws.amazon.com/ko_kr/lambda/latest/dg/lambda-java.html 

  145. https://hbase.tistory.com/78