코딩9 이것이 자바다 - 챕터5 연습 문제 8번 int[][] array = { { 95, 86 }, { 83, 92, 96 }, { 78, 83, 93, 87, 88 } }; int sum = 0; int cnt = 0; for(int i = 0; i9번 Scanner sc = new Scanner(System.in); int students = 0; int[] scores = null; while (true) { System.out.println("-----------------------------------------------"); System.out.println("1.학생수 | 2.점수입력 | 3.점수리스트 | 4.분석 | 5.종료"); System.out.println("---------------.. 2025. 4. 5. 이것이 자바다 - 챕터3 연습 문제 3번 - 학생 1명의 연필 수와, 남은 연필 수 구하기int pencils = 534; int students = 30; int pencilsPerStudent = pencils / students; System.out.println(pencilsPerStudent); int pencilsLeft = pencils % students; System.out.println(pencilsLeft);4번 - 십의 자리 이하를 버리는 코드 만들기 (산술 연산자만 사용)int value = 356; System.out.println(value - value%100); 2025. 4. 5. React + SpringBoot 첫 연동 React와 SpringBoot를 처음 시작하기 전, 간단한 연동을 진행해 보았다. 1. 간단한 스프링부트 프로젝트 만들기Spring Initializr 사이트에 초기 프로젝트를 만들어 줄 수 있다. https://start.spring.io/ 프로젝트 설정하기 Gradle, Java, 버전은 아무것도 안붙은 것(안정화 버전) Web 애플리케이션 통신을 위해 Spring Web은 꼭 포함시켜 주어야 한다. MVC 구조에 맞추어 Controller, Service, Repository 만들기 각각 서비스는 컨트롤러는 서비스에 의존, 레포지토리에 의존, 레포지토리는 엔티티를 포함하여 만들어 주었다.간단하게 설명하면 엔티티는 데이터 모델이고, 레포지토리는 모델을 가저오는 저장소, 서비스는 비즈니스 로직을.. 2025. 3. 15. 이전 1 2 다음 728x90 반응형