전체 글136 [Java] 문자열을 문자 배열로, 문자 배열을 문자열로 변환 String str = "someString"; char[] charArray = str.toCharArray(); // 문자 배열로 변환 String test = new String(charArray); // 문자열로 재변환 참고 : 프로그래머스 가위 바위 보 2022. 11. 7. [Java] 문자열 대문자/소문자 전환 System.out.println(input.toUpperCase()); // 대문자 출력 System.out.println(input.toLowerCase()); // 소문자 출력 Character.isUpperCase(input.charAt(i)) // 해당 문자가 대문자인지 확인 참고 : 코드포스 59A Word 2022. 11. 2. [Java] == 으로 문자열 비교가 안되는 이유 == 는 주소가 동일한지 비교 (같은 객체인지) .equals()는 값이 동일한지 비교 // These two have the same value new String("test").equals("test") // --> true // ... but they are not the same object new String("test") == "test" // --> false ref : https://stackoverflow.com/questions/513832/how-do-i-compare-strings-in-java 2022. 11. 2. [SQL] DATE에서 MONTH만 추출하기 SELECT * FROM MEMBER_PROFILE WHERE MONTH(DATE_OF_BIRTH) = 3; 3월인 대상만 추출하는 SQL 관련 문제 : 프로그래머스 전화번호 목록 2022. 10. 15. 이전 1 ··· 17 18 19 20 21 22 23 ··· 34 다음