자바 4

[Java] 명품 자바 프로그래밍 12장 실습문제

1-1 번 import java.awt.*; import javax.swing.*; public class Chapter12 extends JFrame { Chapter12(){ setTitle("이미지 그리기 연습"); setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); setContentPane(new MyPanel()); setSize(300,300); setVisible(true); } class MyPanel extends JPanel { ImageIcon icon = new ImageIcon("src/back.jpg"); Image img = icon.getImage(); public MyPanel() { setLayout(new FlowLayout()); a..

[JAVA] 명품 자바 프로그래밍 2장 실습문제

1번 import java.util.Scanner; public class main{ public static void main(String[] args){ System.out.print("원화를 입력하세요(단위 원) >>"); Scanner in = new Scanner(System.in); double money = in.nextInt(); System.out.println("3300원은 $" + money / 1100 + "입니다."); } } 2번 import java.util.Scanner; public class main{ public static void main(String[] args){ System.out.print("2자리수 정수 입력(10~99) >> "); Scanner in = ..