Method
Call Method, Flow of Method
//1.메소드(클래스) 작성
Class MyMath {...}
//2. 인스턴스 생성
Mymath mm = new MyMath();
//3. 메소드 호출
(Mymath return type) result = mm.add(1L,2L);
class MyMath {
int max(int a, int b) {
if(a > b)
return a;//when condition is true
else
return b;//when condition is false
}
}Last updated