startsWith 문자열 앞에서부터 글자를 체크해서 맞으면 true 아니면 false를 반환 String st1 = "무야 호오"; System.out.println(st1.startsWith("무")); System.out.println(st1.startsWith("무야")); System.out.println(st1.startsWith("야")); true true false endsWith 문자열 뒤에서부터 글자를 체크해서 맞으면 true 아니면 false를 반환 String st1 = "무야 호오"; System.out.println(st1.endsWith("오")); System.out.println(st1.endsWith("호오")); System.out.println(st1.endsWith..
개발환경 JAVA 11 INTELI J 아래링크 접속 https://start.spring.io/ Spring Boot SNAPSHOT 아직만들고 있는 버전 M1 정식 릴리즈가 되지 않은 버전 Project MetaData Group 회사 도메인 Artifact 빌드가 되었을때 나오는 결과물 (프로젝트명) ADD DEPENDENCIES 버튼 클릭 Spring Web 입력 및 선택 HTML을 만들어주는 템플릿 - 타임리프 선택 GENERATE 클릭 InteliJ 프로그램 설치 방법 https://aamoos.tistory.com/237 [Spring] InteliJ Community 무료버전 설치 아래 링크 접속 https://www.jetbrains.com/idea/download/ Download In..
아래 링크 접속 https://www.jetbrains.com/idea/download/ Download IntelliJ IDEA: The Capable & Ergonomic Java IDE by JetBrains Download the latest version of IntelliJ IDEA for Windows, macOS or Linux. www.jetbrains.com Community - Download Next Next 64-bit launcher check Install Run InteliJ IDEA Community Edition check Confirm Check - Continue Send Anonymous Statistics 클릭 설치완료
GCD 최대공약수 int a= 10; int b = 2; BigInteger b1 = BigInteger.valueOf(a); BigInteger b2 = BigInteger.valueOf(b); BigInteger gcd = b1.gcd(b2); System.out.println(gcd.intValue()); 2 LCD 최소공배수 public static int lcm(int x, int y) { //0이 아닌 두 수의 곱 / 두 수의 최대공약수 return (x * y) / gcd(x, y); } private static int gcd(int a, int b) { if(b == 0) { return a; } return gcd(b, a % b); } System.out.println(lcm(a, b..
Stack Stack s = new Stack(); s.push("0"); s.push("1"); s.push("2"); while(!s.isEmpty()) { System.out.println(s.pop()); } 2 1 0 s.pop(); 1 0 Queue Queue q = new LinkedList(); q.offer("0"); q.offer("1"); q.offer("2"); while(!q.isEmpty()) { System.out.println(q.poll()); } 0 1 2 q.remove(); 1 2 PriorityQueue Queue pq = new PriorityQueue(); pq.offer(3); pq.offer(1); pq.offer(5); pq.offer(2); pq.offer..
해당 URL 접속 https://www.oracle.com/java/technologies/javase-downloads.html JDK Download 클릭 설치할 환경에 맞는 파일 다운로드 다운로드 버튼 클릭 오라클 계정 로그인 받은 파일 설치 내 PC - 속성 - 고급 시스템 설정 보기 클릭 환경변수 클릭 변수 이름 변수 값 JAVA_HOME C:\Program Files\Java\jdk-11.0.11 CLASSPATH .%JAVA_HOME%\lib\tools.jar Path %JAVA_HOME%bin CMD 실행 java -version java -version 입력시 해당 이미지처럼 나오면 설치 성공