Technote/JAVA JAVA 3주차 by Pooh0216 2009. 3. 25. 1. box.classpublic class box { private int length, width, height; public void setLength(int p){length = p;} public void setWidth(int p){width = p;} public void setHeight(int p){height = p;} public int displayVolume() {System.out.println(length*width*height); return (length*width*height);} }boxtester.classpublic class boxtester { /** * @param args */ public static void main(String[] args) { box b1 = new box(); box b2 = new box(); b1.setLength(1); b1.setWidth(2); b1.setHeight(3); b1.displayVolume(); b2.setLength(2); b2.setWidth(2); b2.setHeight(2); b2.displayVolume(); }}2. 공유하기 게시글 관리 International Scholar Pooh 저작자표시 'Technote > JAVA' 카테고리의 다른 글 9주차 2번문제 (0) 2009.05.09 9주차 1번문제 (0) 2009.05.09 JAVA 4주차 (0) 2009.03.25 JAVA 1주차 (0) 2009.03.25 2주차 JAVA 과제물 (0) 2009.03.23 관련글 9주차 1번문제 JAVA 4주차 JAVA 1주차 2주차 JAVA 과제물