자바456 [JPA] CRUDRepository와 JPARepository 공부를 하다보니 CrudRepository와 JpaRepository 2개의 Repository 인터페이스에서 비슷하게 사용하는 것을 보고 차이점이 무엇인지 궁금해져서 찾아보게 되었습니다. 이 인터페이스는 둘 다 Spring Data JPA가 제공하는 인터페이스로, 두 인터페이스 모두 데이터 액세스 계층의 코드를 간결하게 만들기 위해 제공되지만, 제공하는 기능 및 상속 관계에 차이가 있습니다. 🏷️ CrudRepository@Repository public interface UserRepository extends CrudRepository { // ... }CRUDRepository는 기본 CRUD(Create, Read, Update, Delete) 작업을 지원합니다. 그래서 주로 기본 CRUD .. 2025. 4. 1. [프로그래머스/Java] [PCCE 기출문제] 9번 / 이웃한 칸 -Codeclass Solution { public int solution(String[][] board, int h, int w) { int answer = 0; int[] dx = {-1, 1, 0, 0}; int[] dy = {0, 0, -1, 1}; String now = board[h][w]; for (int i = 0; i = board.length || y = board[0].length) { continue; } if (board[x][y].equals(now)) { answer++; } } .. 2025. 3. 9. [백준/파이썬] 33135번 Append and Panic! -Codes = input()set_s = set(s)print(len(s) - len(set_s)) 2025. 3. 9. [프로그래머스/Java] 대충 만든 자판 -Codeimport java.util.*;class Solution { public int[] solution(String[] keymap, String[] targets) { int[] answer = new int[targets.length]; Map map = new HashMap(); for (String key : keymap) { for (int i = 0; i map말고 다른 방식으로 풀다가 틀려서 질문을 보고 map과 getOrDefault를 보고 힌트를 얻어서 해결했습니다. 2025. 3. 7. [프로그래머스/Java] 로또의 최고 순위와 최저 순위 -Codeimport java.util.*;import java.util.stream.Collectors;class Solution { public int[] solution(int[] lottos, int[] win_nums) { List win_list = Arrays.stream(win_nums) .boxed().collect(Collectors.toList()); int current_cnt = 0, zero_cnt = 0; for (int n : lottos) { if (n == 0) { zero_cnt++; continue; } .. 2025. 3. 1. [프로그래머스/Java] 괄호 회전하기 -Codeimport java.util.*;class Solution { public int solution(String s) { int answer = 0; int len = s.length(); Deque deq = new ArrayDeque(); for (int i = 0; i 2025. 3. 1. 이전 1 2 3 4 ··· 76 다음