본문 바로가기

반응형

분류 전체보기

(484)
Method Overriding VS Overloading What is the difference between overriding and overloading in Java? Simply put the difference between them is that method overloading means when methods with the same name but different parameters are usually under one class while the method overriding is when a child class manipulates a method from its parent without changing any parameters. Overloading VS Overriding Common Happens when we manip..
함수 오버로딩 VS 오버라이딩 자바에서 함수 오버로딩과 오버라이딩에 대해 알아보자 (비슷하게 생겨서 헷갈린다). 간단한 차이를 보면 함수 오버로딩은 주로 같은 클래스 내에 동일한 이름을 가진 함수가 다른 매개변수를 가질 때를 의미하고 함수 오버라이딩은 자식클래스가 부모로부터 상속받은 함수를 함수이름이나 매개변수 변경 없이 자식 클래스의 특성에 맞게 수정할 때 사용된다. 오버로딩 VS 오버라이딩 공통점 같은 이름을 가진 함수를 수정 차이점 오버로딩 오버라이딩 함수의 기능을 다른 매개변수로 다양화 부모 클래스 함수를 자식클래스에서 수정 상속관계에서도 사용가능 반드시 상속관계에서만 가능 매개변수가 다르다 (같으면 에러뜬다) 매개변수가 같아야 한다 리턴 타입 달라도 된다 리턴 타입이 같아야 한다 접근권이 달라도 된다 자식함수는 부모함수보다 ..
java: error: release version 21 not supported This error occurs when there is a discrepancy between the Java compiler (JDK) version and the Maven file version. Java compiler version must be equal to or higher than the Maven version to avoid this error. One example that you might encounter this error would be when you create a project without checking the Java and packaging version as shown below If you see the error below when running the p..
자바: 에러: release version 21 not supported 자바 컴파일러 (JDK) 버전과 메이븐 파일의 버전이 불일치할 때 나는 에러로 컴파일러 버전은 반드시 메이븐 버전과 같거나 그 이상이어야 한다. version not supported 에러는 아래와 같이 프로젝트를 생성할 때 SDK와 버전을 확인하지 않고 생성하는 경우 발생한다 프로젝트 생성 후 구동 시 아래와 같은 오류가 나타난다면 파일 -> 프로젝트 설정에서 SDK 버전을 업데이트하거나 pom.xml 파일에 parent와 프로퍼티 버전을 다운그레이드하면 된다 우측 상단에 조그만 아이콘을 클릭하여 pom.xml 파일을 반영 (Ctrl + Shift + O) 이상 HTML 삽입 미리보기할 수 없는 소스
Lombok In Object Oriented Programming, entities are used to pass data. Entities often have fields that specify the characteristics of the entity. It is best practice to use getters and setters to prevent the fields from getting changed directly but the problem is that the getters and setters are boilerplate codes that have nothing to do with the business logic to which effort should be put. Lombok is a..
Inheritance Inheritance is one of the advantages of Object Oriented Programming. It allows us to inherit the characters and actions from its parent and add its features to them if needed. One class can only inherit from one parent and if the parent has a parent the child can also inherit the characters and actions from the ancient. HTML 삽입 미리보기할 수 없는 소스
상속 객체지향 프로그램에 장점 중하나인 상속에 대해 알아보자. 상속은 하나의 클래스의 특성과 기능을 물려받고 필요에 따라 상속받는 클래스의 부가적인 특성을 추가하거나 물려받은 특성을 수정하여 사용하는 기능이다. 하나의 클래스는 하나의 부모로부터 상속가능하며 부모다 다른 클래스를 상속하는 경우 조상의 특성은 모두 사용가능하다. HTML 삽입 미리보기할 수 없는 소스
Class A class is a blueprint that describes the features and actions of an object in Object Oriented Programming hence it is referred to as a cookie cutter. A class has fields that define the features, methods for actions, and constructors to instantiate the class. The concept is the same across all the programming languages but how to use them differs so today we will see how we can use class in Java..

728x90