We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ad980ac commit d0fa43aCopy full SHA for d0fa43a
1 file changed
src/effectivejava/chapter9/item60/IntChange.java
@@ -1,14 +1,15 @@
1
package effectivejava.chapter9.item60;
2
3
public class IntChange {
4
+ // 코드 60-3 정수 타입을 사용한 해법 (357쪽)
5
public static void main(String[] args) {
6
int itemsBought = 0;
7
int funds = 100;
8
for (int price = 10; funds >= price; price += 10) {
9
funds -= price;
10
itemsBought++;
11
}
- System.out.println(itemsBought + " items bought.");
12
- System.out.println("Cash left over: " + funds + " cents");
+ System.out.println(itemsBought + "개 구입");
13
+ System.out.println("잔돈(센트): " + funds);
14
15
0 commit comments