목록JAVA/chapter09_this (2)
WON.dev
chapter02 : book
package org.joonzis.ex; public class Ex02_Book { // 필드 String title, writer; int price, salesVolume; boolean isBestSeller; public Ex02_Book() {} public Ex02_Book(String title, int price) { this(title, "작자미상", price); } public Ex02_Book(String title, String writer, int price) { this.title = title; this.writer = writer; this.price = price; } }
JAVA/chapter09_this
2023. 5. 26. 18:09
chapter01 : rect / rectmain
package org.joonzis.ex; public class Ex01_Rect { int width, height; public Ex01_Rect() {} public Ex01_Rect(int width, int height) { this.width = width; this.height = height; } void setWidth(int width) { this.width = width; } void setHeight(int height) { this.height = height; } void output() { System.out.println("너비 : " + width); System.out.println("높이 : " + height); } } package org.joonzis.ex; p..
JAVA/chapter09_this
2023. 5. 26. 18:08