You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Distance{
private int east;
private int west;
private int north;
private int south;
public void setEast(int east){ this.east = east; }
public void setWest(int west){ this.west = west; }
public void setNorth(int north){ this.north = north; }
public void setSouth(int south){ this.south = south; }
public int getEast() { return east; }
public int getWest() { return west; }
public int getNorth() { return north; }
public int getSouth() { return south; }
}
아래 코드를 enum 과 인스턴스 필드를 사용하여 중복을 제거 해 봅시다.
출처: https://effectiveprogramming.tistory.com/entry/enum-을-배열의-인덱스로-활용하는-방법
The text was updated successfully, but these errors were encountered: