Technote/JAVA JAVA 1주차 by Pooh0216 2009. 3. 25. 반응형 1. FILE name : copyandpast.class public class copyandpast { public static void main(String[] args) { System.out.print("Myfavorite number is"); System.out.println("1+2+3"); } } 2. 1+2+3+4+5를 계산하여 결과를 화면에 보여주는 프로그램을 작성하시오 FILE name : copyandpast.class public class copyandpast { public static void main(String[] args) { System.out.println(1+2+3+4+5); } } 3. public class copyandpast { public static void main(String[] args) { System.out.println("*************"); System.out.println("* kangwon *"); System.out.print ("*************"); } } 4. import javax.swing.JOptionPane; public class copyandpast { public static void main(String[] args) { JOptionPane.showMessageDialog(null,"Hello,Mary!"); System.exit(0); } } 5. import javax.swing.JOptionPane; public class copyandpast { public static void main(String[] args) { String name = JOptionPane.showInputDialog("What is your name?"); JOptionPane.showMessageDialog(null,"hello "+name+"!"); //System.out.println("Hello,"+name+"!"); System.exit(0); } } 6. import javax.swing.JOptionPane; public class copyandpast { public static void main(String[] args) { String name = JOptionPane.showInputDialog("몇월 입니까?"); JOptionPane.showMessageDialog(null,"좋은 "+name+"이군요 반갑습니다. !"); //System.out.println("Hello,"+name+"!"); System.exit(0); } } 반응형 좋아요공감공유하기 URL 복사카카오톡 공유페이스북 공유엑스 공유 게시글 관리 구독하기International Scholar HW 저작자표시 (새창열림) 'Technote > JAVA' 카테고리의 다른 글 9주차 2번문제 (0) 2009.05.09 9주차 1번문제 (0) 2009.05.09 JAVA 4주차 (0) 2009.03.25 JAVA 3주차 (0) 2009.03.25 2주차 JAVA 과제물 (0) 2009.03.23 관련글 9주차 1번문제 JAVA 4주차 JAVA 3주차 2주차 JAVA 과제물 International Scholar HWHyun Wong Choi International Scholar Pooh® IT Professional Google Scholar: https://scholar.google.com/citations?user=KigVvRgAAAAJ&hl=en&oi=ao Contact: pooh0216@gmail.com구독하기