전체 글121 [문자열처리] 헷갈리는 내용 개념 정리 Java 1. char (기본형, primitive type)자바에서 char는 2바이트(16bit) 숫자 값을 저장하는 타입이에요.'P' 라는 리터럴은 사실상 유니코드 값(80, 0x0050) 이 메모리에 들어가 있는 것.예시: char c = 'P'; // 메모리 속 c = 80 (유니코드 값)2. String (객체, reference type)String 은 문자의 배열을 감싼 객체입니다."P" 라는 문자열은 내부적으로 ['P'] 라는 char[] 배열을 갖고 있어요.예시: String s = "P"; // 메모리 속 s ──► ["P"] (char 배열 내부: ['P']) ✅ 올바른 비교if (big.charAt(i) == 'P') { ... }❌ 잘못된 비교big.charAt(i) == "P";왼쪽은 .. 2025. 9. 3. [문자열 처리] 프로그래머스 이상한 문자 만들기 Java ✔ 문제https://school.programmers.co.kr/learn/courses/30/lessons/12930 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr ✔ 풀이class Solution { public String solution(String s) { StringBuilder sb = new StringBuilder(); int idx = 0; for(int i=0; i 간단하게 풀 수 있었는데 처음에 복잡하게 풀었다. 2025. 9. 3. [문자열처리 | Java] 백준 그룹 단어 체커 🔴 ✔ 문제https://www.acmicpc.net/problem/1316 ✔ 풀이 import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Main { private static boolean isGroupWord(String s) { boolean[] seen = new boolean[26]; char prev = 0; for(int i=0; i아이디어 단어를 왼쪽→오른쪽으로 보면서prev(직전 문자)를 저장seen[26]로 해당 문자를 이미 본 적 있는지 체크현재 문자가 prev와 같으면 계속 진행현재 문자가 prev와.. 2025. 9. 3. [문자열 처리 | Java] 프로그래머스 문자열 내마음대로 정렬하기 ✔ 문제 http://school.programmers.co.kr/learn/courses/30/lessons/12915?language=java 프로그래머스SW개발자를 위한 평가, 교육의 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr ✔ 풀이 1import java.util.*;class Solution { public String[] solution(String[] strings, int n) { String[] answer = new String[strings.length]; List list = new ArrayList(); for (int i = 0; i 📌 동작 방식StringBuilder sb =.. 2025. 9. 2. 스픽 37일차 - 긍정긍정 칭찬하기 I like the way dress, I appreciate it 외국인들과 대화할 때 술술풀리지 않으니칭찬 몇마디 나눠줘야 한다.옷이 멋있다, 머리가 멋지다 등실제로 이런 칭찬을 외국인들과 대화할 때 자연스럽게 많이 주고 받았다.I like the way you dress.I like the way she dresses.I like the way your help.I like the way she speak with confidence.I like the way your positive attitude.I appreciate it. 정말 감사할 때I appreciate your help!I appreciate your kind words. 칭찬 받았을 때I appreciate your compliment. 2025. 5. 10. 스픽 36일차 - I have a habit of, tend to (~하는 습관/버릇이 있다, 경향이 있다) I have a habit of picking my libs.I have a habit of drink coffee in the morning.I get tired pretty quickly when I’m outside for a long time. 2025. 4. 21. 스픽 32일차 - How do you get to work? How do you get to work?어떻게 출근해?I usually commute by bus.How was your subway in the morning?The subway is always overcrowded.지하철은 항상 사람이 너무많아.Do you usually leave the office on time?I rarely leave the office on time.What do you think about the flight ticket prices?The tickets are always overpriced. 2025. 4. 17. 스픽 29일차 - can't help my self from, ~ get the urge to ~ 하는걸 참을 수 없어 I can't help myself going traveling.나는 여행가는걸 참을 수 없어I can't help myself from booking flight.나는 비행기표 사는걸 참을 수 없어I get the urge to buy a plane ticket. 2025. 4. 14. 스픽 27일차 - what do you feel like eating? What do you feel like eating? I have a craving for pork belly.Do you wanna grab some drinks tonight?I shoud cut down on alcohol. But I'm cravingbeer!What do you in the mood for?I'm craving Wine with cheeses.I'm drained. I need sugar. 당떨어져(지쳤어. 슈가필요해) I'm craving dark chocolate. 2025. 4. 12. 이전 1 2 3 4 ··· 14 다음