This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package JavaSource; | |
import java.util.Random; | |
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static int solution(int 나이, int 입장시간, char 유공자, char 복지카드) { | |
int 입장료 = 10000; | |
int 특별할인 = 4000; | |
int 일반할인 = 8000; | |
if (복지카드 == 'y' || 유공자 == 'y') { | |
입장료 = 일반할인; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc = new Scanner(System.in); | |
System.out.println("[캐시백 계산]"); | |
System.out.print("결제 금액을 입력해 주세요.(금액):"); | |
int amount = sc.nextInt(); | |
sc.nextLine(); | |
int cashback; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
System.out.println("[구구단 출력]"); | |
for (int i = 1; i < 10; i++) { | |
for (int j = 1; j < 10; j++) { | |
System.out.format("%02d × %02d = %02d\t", j, i, j*i); | |
} | |
System.out.printf("\b\n"); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.nio.file.Files; | |
import java.nio.file.Path; | |
import java.nio.file.Paths; | |
import java.util.List; | |
public class FileUtils { | |
public String getLoadText(String filePath) { | |
StringBuilder sb = new StringBuilder(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
System.out.println("<<<<[메뉴선택]>>>>\n" + | |
"1. 회원 관리\n" + | |
"2. 과목 관리\n" + | |
"3. 수강 관리\n" + | |
"4. 결제 관리\n" + | |
"5. 종료"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Pager { | |
private long totalCount;//전체 개시글 수 | |
private static final int ITEMS_PER_PAGE = 10;//페이지당 글의 수 | |
private static final int PAGES_PER_BLOCK = 10;//페이지 네비게이션 블록 당 페이지 수 | |
public Pager (long totalCount) { | |
this.totalCount = totalCount; | |
} | |
public String html(long pageNum) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.HashSet; | |
import java.util.Scanner; | |
import java.util.Set; | |
class Point { | |
int x; | |
int y; | |
public Point(int x, int y) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
김태희 (30기) | |
JAVA 미니과제 8번 | |
*/ | |
import java.util.Scanner; | |
public class JavaStudy08 { | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
김태희 (30기) | |
JAVA 미니과제 7번 | |
*/ | |
import java.util.Scanner; | |
import java.util.Random; | |
import java.util.Arrays; | |
import java.util.HashSet; | |
import java.util.Set; |
NewerOlder