๋ฐ์ํ java51 [์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1011~1020๋ฒ 1011๋ฒ import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws IOException { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String a = br.readLine(); br.close(); PrintWriter pw = new PrintWriter(System.out); pw.println(a); pw.flush(); pw.close(); } } 1012๋ฒ import java.util.*; import java.io.*; public class Main { public st.. 2023. 2. 27. [์ฝ๋์ ๊ธฐ์ด 100์ -JAVA] 1001~1010๋ฒ BufferedReader, StringTokenizer, PrintWriter ๋ฅผ ์ฌ์ฉํด์ ํ์๋ค. ์๋(์๊ฐ ์ด๊ณผ)๋ฅผ ์๊ฐํ์๋ค. 1001๋ฒ public class Main { public static void main(String[] args) { System.out.println("Hello"); } } 1002๋ฒ public class Main { public static void main(String[] args) { System.out.println("Hello World"); } } 1003๋ฒ public class Main { public static void main(String[] args) { System.out.println("Hello"); System.out.println("W.. 2023. 2. 27. [Java-๊ธฐ์ด] ์ค์ต (ํฉ๊ณ, ํ๊ท , ์์ฐจ ์ฐ์ถ ํ๋ก๊ทธ๋จ) Subject.java package subject; public class Subject { protected int kor, eng, math, sum; protected double avg; public int getKor() { return kor; } public void setKor(int kor) { this.kor = kor; } public int getEng() { return eng; } public void setEng(int eng) { this.eng = eng; } public int getMath() { return math; } public void setMath(int math) { this.math = math; } public int getSum() { return s.. 2021. 2. 24. [Java-๊ธฐ์ด] ์ค์ต (์ฃผ๋ฌธ๋ฒํธ, ์ํ์ด๋ฆ, ์ํ๊ฐ๊ฒฉ, ๊ฐฏ์) package quiz; public class OrderData { private int orderNum; private String orderProduct; private int price; private int qty; private MemberData memberData; public OrderData() { } public OrderData(int orderNum, String orderProduct, int price, int qty, MemberData memberdata) { this.orderNum = orderNum; this.orderProduct = orderProduct; this.price = price; this.qty = qty; this.memberData = memberd.. 2021. 2. 24. [Java-๊ธฐ์ด] ์ค์ต (๋ฉค๋ฒ ํธ์ถ) ์ค์ต) get,set ๋ฉ์๋๋ฅผ ์ฌ์ฉํด์ ๋ฐ์ ๋ด์ฉ์ฒ๋ผ ์ถ๋ ฅ๋๊ฒ ํ์์ค ์กฐ๊ฑด : ๋ฉ์๋ ์ฌ์ ์, ArrayList ์ฌ์ฉํด์ ํ์ ์ ๋ ฅ โ โ MemberData.java package quiz; public class MemberData { private String memberID; private String name; private String tel; private String gender; public MemberData(String memberID, String name, String tel, String gender) { this.memberID = memberID; this.name = name; this.tel = tel; this.gender = gender; } public MemberD.. 2021. 2. 24. [Java-๊ธฐ์ด] ์ค์ต (๋ฉ์๋๋ก ๊ตฌ๊ตฌ๋จ ํธ์ถํ๊ธฐ) ์ค์ต) ๊ตฌ๊ตฌ๋จ์ ๋ง๋ค์ด๋ณด์์ค. ์กฐ๊ฑด : ๋ฉ์๋๋ก ํธ์ถํ๊ธฐ โ โ ProgTest1.java package quiz; import java.util.Scanner; public class ProgTest1 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("๋ช๋จ์ ๋ณด์๊ฒ ์ต๋๊น?"); int n = sc.nextInt(); int dan, times; System.out.println(n + "๋จ :"); for (dan = n; dan 2021. 2. 24. ์ด์ 1 2 3 4 5 ยทยทยท 9 ๋ค์ ๋ฐ์ํ