Java

UML 표기법

amungstudy 2024. 5. 28. 22:58

 

  • + 는 public
  • getOne은 메소드 이름
  • 괄호 안에 있는 것은 매개 변수
  • 콜론(:) 뒤에는 리턴 type

 

 

 

public class MathBean {

    public void printClassName(){
        System.out.println("MathBean");
    }

    public void printNumber(int number){
        System.out.println(number);
    }

    public int getOne(){
        return 1;
    }

    public int plus(int x, int y){
        return x + y;
    }
}