song.log

[자바 기술면접] 07. 메서드란? 본문

StudyLog/Java interview

[자바 기술면접] 07. 메서드란?

SingaKorean 2023. 4. 28. 17:12
728x90
반응형

- 정의

메서드(Method)는 자바에서 특정 작업을 수행하는 명령문의 집합입니다. 복잡한 작업을 보다 작고 관리하기 쉬운 하위 작업으로 나누는 데 사용됩니다. 메서드는 클래스 내에서 정의되며 해당 클래스의 객체에서 호출될 수 있습니다. 메서드는 접근제어자, 메서드 이름, 매개변수 목록, 매서드 내용으로 정의됩니다. 

 

 

- 영어 정리 : 

Method is a collection of statements that perform a specific task. It is used to break down a complex task into smaller, more manageable sub-tasks. Methods are defined within a class and can be called by objects of that class. 

Methods are defined within a class and can be called by objects of that class. Method definition has five parts. They are access modifier, return type, method name,  parameter list and the body of the method.

728x90
반응형
Comments