Reflection 이란? Reflection은 Class라는 API를 사용해 클래스, 메소드, 필드등에 대해 구체적으로 알지 못하더라도 런타임에 접근하게 해주는 기능입니다. Reflection allows programmatic access to information about the fields, methods and constructors of loaded classes, and the use of reflected fields, methods, and constructors to operate on their underlying counterparts, within encapsulation and security restrictions. 리플렉션을 사용하면 로드된 클래스의 필드, 메서드 및 생성자..

람다식(Lambda Expression)에 대해 알아보겠습니다. 하지만 람다식에 대해 알아보기 전에 먼저 알고 넘아가면 도움이 될만한 선행지식들을 짚고 넘어가겠습니다. 익명 클래스(Anonymous Classes) It is an inner class without a name and for which only a single object is created. An anonymous inner class can be useful when making an instance of an object with certain “extras” such as overriding methods of a class or interface, without having to actually subclass a class. ..

* Java8 버전의 문법을 기준으로 작성되었습니다. 제네릭이란? 무언가에 대해 이해하기 위해선 명확한 정의가 필요하다고 생각합니다. 따라서 몇 가지 레퍼런스들을 찾아보았습니다. They(Generics) were designed to extend Java's type system to allow "a type or method to operate on objects of various types while providing compile-time type safety". 제네릭은 컴파일 타임 타입 안정성을 제공하면서, 다양한 타입의 객체에서 작동하는 타입 또는 메소드를 허용하도록 Java의 타입 시스템을 확장하도록 설계된 기능이다. - Wikipedia / Generics in Java 제네릭의 기능을..

자바의 예외처리에 대해 알아보겠습니다. 오류의 종류 프로그램은 오작동을 일으킬 때 오류를 발생시킵니다. 여러 가지의 오류들이 있지만 크게 두 가지 타입으로 나눠볼 수 있습니다. CompileTime Exception RunTime Exception CompileTime에 발생하는 오류나 예외는 말 그대로 컴파일 시 발생되며 이 때문에 컴파일 에러 발생할 시 프로그램 빌드가 불가해 집니다. RunTime에 발생하는 오류는 프로그램 실행 중 발생하는 오류들을 이야기하며, 컴파일러가 알려주지 않기 때문에 개발자는 발생 가능한 RunTime 오류들을 미리 처리해 두어야만 합니다. 자바의 Exception 자바는 발생 가능한 다양한 오류들을 정의해서 제공하고 있습니다. 모든 오류들은 Throwable class를..