inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

172만명의 커뮤니티!! 함께 토론해봐요.

BooleanExpression 관련 질문있습니다.

미해결

실전! Querydsl

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? ( 예 /아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? ( 예 /아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? ( 예 /아니오) [질문 내용] 여기에 질문 내용을 남겨주세요. 안녕하세요 강의 잘 보고 있습니다! 강의를 수강하다 몇가지 궁금한게 생겨 이렇게 질문 남깁니다. 1. BooleanExpression - where 다중 파라미터 사용 강의에서 강사님이 'where 다중 파라미터 사용'이라는 제목으로 이야기 하실 때 BooleanExpression 을 소개하시는데 아래와 같이 구현하면 BooleanBuilder 로도 where 다중 파라미터가 가능한 것 아닌가요?? private List<Member> searchMember1(String usernameCond, Integer ageCond) { return queryFactory .selectFrom(member) .where(usernameBuilder(usernameCond), ageBuilder(ageCond)) .fetch(); } private BooleanBuilder usernameBuilder(String usernameCond) { if (usernameCond != null) { return new BooleanBuilder(member.username.eq(usernameCond)); } else return new BooleanBuilder(); } private BooleanBuilder ageBuilder(Integer ageCond) { if (ageCond != null) { return new BooleanBuilder(member.age.eq(ageCond)); } else return new BooleanBuilder(); } 2. BooleanExpression 을 선호하시는 이유 다음과 같이 BooleanExpression 으로 allEq() 구현시 BooleanExpression은 추상클래스라 객체생성이 안되기 때문에 NPE가 발생할 수 있는데 private BooleanExpression usenameEq(String usernameCond) { return usernameCond != null ? member.username.eq(usernameCond) : null; } private BooleanExpression ageEq(Integer ageCond) { return ageCond != null ? member.age.eq(ageCond) : null; } private BooleanExpression allEq(String usernameCond, Integer ageCond) { return usenameEq(usernameCond).and(ageEq(ageCond)); // NPE 조심 } 반면 BooleanBuilder 은 실제 클래스라 객체 생성이 되기 때문에 NPE도 방지가 가능합니다. private BooleanBuilder usernameBuilder(String usernameCond) { if (usernameCond != null) { return new BooleanBuilder(member.username.eq(usernameCond)); } else return new BooleanBuilder(); } private BooleanBuilder ageBuilder(Integer ageCond) { if (ageCond != null) { return new BooleanBuilder(member.age.eq(ageCond)); } else return new BooleanBuilder(); } private BooleanBuilder allBuilder(String usernameCond, Integer ageCond) { return usernameBuilder(usernameCond).and(ageBuilder(ageCond)); } 이렇게만 보면 사실 BooleanExpression을 쓸 이유가 없어보이는데 BooleanExpression을 선호하시는 이유가 있으신가요??

  • java
  • jpa
djqwkfj43u 댓글 1 좋아요 0 조회수 169

Failed to load module script 에러가 뜹니다

해결됨

한 입 크기로 잘라 먹는 리액트(React.js) : 기초부터 실전까지

오늘 카운터앱 강의를 들으면서 새로운 파일 (section06)을 만들었는데요. 가장 기본 세팅을 하고 화면에 카운터앱 이라는 단어를 렌더링 하려고 npm run dev를 한 후 ctrl shift p 를 눌러 페이지에 들어갔는데 글자가 렌더링 되지 않길래 개발자 도구를 켜 보았더니 Failed to load module script : Expected a JavaScript module script but the server responed with a MIME type of "text/jsx". Strict MIME type checking is enforced for module scripts per HTMl spec. 라는 오류가 뜨네요. 오류 해결을 위해 업데이트도 해보고, 파일을 지웠다 새로 만들어도 보고, 지피티에 물어보거나 인터넷에 검색도 해봤는데 도저히 오류가 고쳐지지 않습니다. 혹시나 해서 이번에 새로 만든 파일 말고 section05 파일을 실행시켜 보았더니 어제는 잘 되던 파일이 오늘은 똑같은 오류가 뜨며 실행이 되지 않더라구요. 무슨 오류일까요 ㅠㅠ 제발 도와주세요 엉엉엉엉엉엉엉엉

  • javascript
  • react
  • node.js
dldbfla466 댓글 4 좋아요 0 조회수 574

예제코드 자바입니다

미해결

2주만에 통과하는 알고리즘 코딩테스트 (2024년)

복습하면서 자바로도 풀어봤어요 필요하신분들 확인!! https://github.com/hyukjunkim1116/algorithm-master-in-2weeks

  • python
  • 코딩-테스트
  • 알고리즘
  • 자바
  • java
김혁준 댓글 1 좋아요 1 조회수 207

선생님 혹시 자바 공부나 개발에 대한 책 추천 해주실 수 있으십니까

미해결

김영한의 실전 자바 - 고급 2편, I/O, 네트워크, 리플렉션

현재 나온 자바 강의 모두 결제했지만 책으로도 병행하고 싶어서 여쭤봅니다 자바의 정석 같은 기본서보다 좀 더 깊게 들어갈 수 있는 책 추천 해주실 수 있으십니까

  • java
  • 객체지향
yuntyu01 댓글 2 좋아요 0 조회수 358

혹시 백엔드서버를 종료해도 에러가 뜨지안고 정상가동되면 어떻게해야하나요?

해결됨

한 입 크기로 잘라먹는 Next.js

혹시 백엔드서버를 종료해도 에러가 뜨지안고 정상가동되면 어떻게해야하나요?.. 당황스럽네요 하하 아 캐싱문제네요 강제 새로고침으로 해결했습니다. 감사합니다. 음 아니네요 여전히 이상하네요.. 전 이상하게 Footer에서 먼저 에러가 나네요. force cache가 되어있음에도.. 왜그럴까요?ㅜㅜ

  • react
  • typescript
  • next.js
codingforfun 댓글 2 좋아요 1 조회수 485

강의 2.8을 듣고 있는 도중 use client에 대해서

해결됨

한 입 크기로 잘라먹는 Next.js

use client 가 선언되지 않아도 searchable-layout.tsx 에서 useEffect 가 동작 하는 이유는 무엇인가요? 제가 알기론 이런 클라이언트사이드 훅들은 use client를 최상위에 선언해줘야 동작한다고 이해했었습니다..

  • react
  • typescript
  • nextjs
Seungjoo Lim 댓글 2 좋아요 0 조회수 175

axios post 사용할때 페이지 새로고침 문제

미해결

React 완벽 마스터: 기초 개념부터 린캔버스 프로젝트까지

Home.jsx 이렇게 하고 import { useEffect, useState } from 'react'; import HomeDataLength from '../components/HomeDataLength.jsx'; import HomeSearch from '../components/HomeSearch.jsx'; import CanvasItemList from '../components/CanvasItemList.jsx'; import SearchBar from '../components/SearchBar.jsx'; import GridFlexBTN from '../components/GridFlexBTN.jsx'; import { deleteHome, createHome, getHome } from '../api/home.js'; import { v4 as uuid } from 'uuid'; import dayjs from 'dayjs'; export default function Home() { const [isGrid, setIsGrid] = useState(true); const [search, setSearch] = useState(''); const [data, setData] = useState([]); const [isLoading, setIsLoading] = useState(false); const [error, setError] = useState(false); useEffect(() => { const api = async () => { setIsLoading(true); setError(false); try { const response = await getHome(''); setData(response.data); } catch (err) { setError(err); } finally { setIsLoading(false); } }; api(); }, []); const [isLoadingCreate, setIsLoadingCreate] = useState(false); const [createError, setCreateError] = useState(false); // 등록버튼 누르면 새로운 데이터 저장 const handleNewCreate = async () => { // setIsLoadingCreate(true); // setCreateError(false); // try { const id = uuid(); const newCreate = { id, date: dayjs().format('YYYY-MM-DD HH:mm:ss'), text: `${id.substring(0, 4)}-테스트`, category: '테스트', }; await createHome(newCreate); console.log(123); // const res = await getHome(); // setData(res.data); // } catch (err) { // setCreateError(err); // console.log(createError, 'createError'); // } finally { // setIsLoadingCreate(false); // } }; const handleText = text => { const searchData = data.filter(d => d.text.toLowerCase().includes(text.toLowerCase()), ); if (searchData.length === 0) { setSearch(null); } else { setSearch(searchData); } }; const handleDelete = async id => { // const newData = data.filter(d => d.id !== id); // setData(newData); await deleteHome(id); }; return ( <> <> <div className="flex flex-col md:flex-row justify-between items-center"> <button className="hover:bg-blue-400 bg-blue-500 text-white rounded-md text-bold p-3" onClick={handleNewCreate} > 등록하기 </button> {isLoadingCreate && <p>등록중</p>} {createError && <p>{createError}</p>} <SearchBar handleText={handleText} /> <GridFlexBTN setIsGrid={setIsGrid} isGrid={isGrid} /> </div> <HomeDataLength data={data} error={error} isLoading={isLoading} /> <HomeSearch search={search} /> {!isLoading && !error && ( <CanvasItemList data={data || []} search={search} isGrid={isGrid} handleDelete={handleDelete} /> )} </> </> ); } home.js 파일은 아래와 같은 상태이면 import { home } from './http'; // 목록 조회 export const getHome = () => { return home.get('/'); }; // 등록 export const createHome = newCreate => { try { console.log('ㅅㅣ작'); } catch (error) { console.log('에러'); } finally { console.log('종료'); } // debugger; return home.post('/', newCreate); }; // 수정 // 삭제 export const deleteHome = id => { return home.post('/', id); }; db는 server-json을 사용하고 있습니다. 그런데 get 요청을 할때는 잘 작동하는데 post로 등록하거나 삭제할때는 db에 정상 등록, 삭제되는데 화면이 새로고침이 되버리는 상태입니다. Home.jsx 화면이 리렌더링이 되도록 하고싶은데 새로고침은 왜 그런지 모르겠습니다. postman으로도 post로 db에 저장했는데 리액트 화면이 자동으로 새로고침 되버립니다. 구글링도 해봤는데 해결이 안되서 문의드립니다. 혹시나 해서 db.json이 변경되면 화면도 변경될까 싶어서 을 db.json --watch로만 해보고 --watch도 없애봤는데 안됩니다. const handleNewCreate = async () => { console.log('시작1'); const id = uuid(); const newCreate = { id, date: dayjs().format('YYYY-MM-DD HH:mm:ss'), text: `${id.substring(0, 4)}-테스트`, category: '테스트', }; const data = await createHome(newCreate); console.log(data, 'data'); console.log('시작2'); debugger; }; debugger를 사용했을때 이렇게 데이터 나오는데 디버거 끄는 순간 바로 화면이 새로고침 되고 있습니다. 그리고 콘솔창도 새창으로 이전 내역이 다 사라지는 상태입니다.

  • react
  • React-Context
  • react-router
  • tailwindcss
  • react-query
밈몀묘 댓글 2 좋아요 0 조회수 252

캐스팅 질문 입니다

미해결

김영한의 실전 자바 - 기본편

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요 캐스팅 배우면서 헷갈리는 부분이 있어 문의 드립니다 Parent poly = new Child(); poly에는 Child의 참조값을 가지게 되는데 참조값을 가지고 자식 클래스에 접근을 할 수 없는 부분이 이해가 잘 안갑니다 ㅜㅜ 참조값을 통해 해당 객체 메모리에 접근을 할 수있는데 왜 부모 클래스는 확인이 안되는건가요? 메모리에 접근을 해도 해당변수 타입만 확인을 할 수 있는건가용?

  • java
  • 객체지향
딩띵 댓글 1 좋아요 0 조회수 101

Future Vs. CompletableFuture

해결됨

김영한의 실전 자바 - 고급 1편, 멀티스레드와 동시성

[질문 내용] 강의 너무 잘 듣고있습니다. 요즘 실무에서는 Future 말고 CompletableFuture를 많이 쓰는걸로 아는데 이에 대한 강의는 없으신가요? 그리고 CompletableFuture 사용에 대한 의견도 궁금합니다.

  • java
  • 객체지향
  • 동시성
  • multithread
  • thread
이승철 댓글 2 좋아요 2 조회수 269

메서드 선언부와 본문 간의 형변환

미해결

김영한의 자바 입문 - 코드로 시작하는 자바 첫걸음

[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 안녕하세요, 메서드 강의를 듣는 중 메서드 선언부, 본문에 대해 궁금한 점이 생겨 여쭤보게 됩니다. 메서드 선언부와 본문에 등장하는 메서드 타입, 파라미터 타입, 리턴 타입이 모두 같아야 한다고 강의 도중 말씀하신 것 같아 형변환 원리가 적용되나 싶어 인텔리제이로 실행을 해보니 말씀 그대로 하나라도 다르면 적용이 안되었습니다. 형변환 원리가 적용되지 않는 것이 확실한지 싶어 구글링하여 찾아보았는데 형변환 원리가 일부 적용된다고 하여서 질문을 작성하게 되었습니다. 메서드 선언부(본문) - 호출부 간에는 자료형이 달라도 형변환 원리가 적용되는 것은 이해가 되었는데, 메서드 선언부와 본문에 등장하는 변수 타입은 형변환 원리가 적용되지 않는게 맞을까요 ? 좋은 강의 제공해주셔서 항상 감사드립니다 !!

  • java
  • 객체지향
댓글 2 좋아요 0 조회수 154

final 메서드 오버라이딩

미해결

김영한의 실전 자바 - 기본편

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 오버라이드 자체가 부모의 메서드를 재정의 하는 것 즉 오버라이드 하면 부모 메서드에 영향을 주는게 아닌데 final을 사용 하지 못하는 이유는 설계 의도가 맞지 않아서 사용하지 못하는게 맞을까요?

  • java
  • 객체지향
딩띵 댓글 1 좋아요 0 조회수 116

서버 구동이 안됩니다.

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

1..2일차 영상 보면서... 환경을 만드는데.... 서버 구동이 안됩니다. 초초초보입니다....... A problem occurred configuring root project 'library-app'. > Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5')

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
lchjjjs10004 댓글 3 좋아요 0 조회수 181

배포 환경에서 fetch 오류

미해결

한 입 크기로 잘라먹는 Next.js

실제 https로 배포된 API를 fetch를 활용하여 SSR을 구현하고있습니다. 문제는 local에서는 yarn build -> yarn start 하고 테스트를 진행하면 fetch가 정상적으로 작동합니다. 하지만 AWS Amplify를 활용하여 Next JS를 배포하고 배포한 사이트에서 fetch(pending 이후에 catch로 빠짐)가 작동하지않습니다. API에 문제가 있나해서 다른 API를 CSR로 테스트를 해보면 정상적으로 200이 됩니다. 원인이 뭘까요?

  • react
  • typescript
  • next.js
brh1243 댓글 2 좋아요 0 조회수 219

static 페이지vs 다이나믹 페이지

해결됨

한 입 크기로 잘라먹는 Next.js

폴라우트 페이지 2를 보면서 / 인덱스페이지가 강사님은 static 페이지가 아닌 다이나믹 페이지로 빌드가 되는 부분에서 강사님은 fetch에 force-cache를 적용시키면서 이제 다이나믹된 페이지를 static 페이지로 바꾸셨느데 일단 저는 force-cache 옵션을 적용을 안해도 static 페이지이더라구요 강사님과 저랑 다른 점은 api호출하는 함수 부분을 따로 api 폴더에 빼둔거 말고는 다른 점은 없습니다 . 이렇게 따로 빼놓은 뒤 그냥 promis.all로 데이터 패칭을 해서 그대로 화면에 보여줬습니다 (이것저것 시험하느라 Allbook ,RandomBook 컴포넌트를 따로 빼지는 않은 상태입니다. ) export default async function Home() { const [allBooks, randomBooks] = await Promise.all([ fetchBooks(), fetchRandomBook(), ]); 저는 force-cache 를 적용안햇는데도 왜 다이나믹 페이지가 안되고 static 페이지가 되는걸까요 ...

  • react
  • typescript
  • next.js
aso 댓글 2 좋아요 3 조회수 291

mokito관련 주의 문구

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 섹션 2-5 듣고 있습니다 MemberRepositoryTest를 실행하면 test는 패스 되고 다른 기능들도 잘 동작하지만 주의 문구가 뜹니다 프로그램에 지장이 있는걸까요? 어떻게 해결해야 할까요? Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build what is described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3 WARNING: A Java agent has been loaded dynamically (C:\Users\shina\.gradle\caches\modules-2\files-2.1\net.bytebuddy\byte-buddy-agent\1.15.11\a38b16385e867f59a641330f0362ebe742788ed8\byte-buddy-agent-1.15.11.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release package jpabook.jpashop; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.Rollback; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.transaction.annotation.Transactional; import static org.assertj.core.api.Assertions.assertThat; @ExtendWith(SpringExtension.class) @SpringBootTest class MemberRepositoryTest { @Autowired MemberRepository memberRepository; @Test @Transactional @Rollback(false) public void testMember() throws Exception{ //given Member member = new Member(); member.setUsername("memberA"); //when Long saveId = memberRepository.save(member); Member findMember = memberRepository.find(saveId); //then assertThat(findMember.getId()).isEqualTo(member.getId()); assertThat(findMember.getUsername()).isEqualTo(member.getUsername()); assertThat(findMember).isEqualTo(member); } }

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
황신애 댓글 1 좋아요 0 조회수 770

2024년 1회 기출 23:10 질문 자바실행순서

해결됨

(2026 최신!) 일주일만에 합격하는 정보처리기사 실기

Parent 클래스가 자료형 Child 클래스가 생성자로 // 업캐스팅 이름이 parent 인 객체를 만들었는데 parent.x parent.y 를 했을경우 값이 어떻게 출력돼나요? 변수x는 부모랑 자식에 둘다 있어서 모르겠습니다 상속을 받는 경우 , 기능(매서드)을 상속받고 변수들은 어떻게 되는건가요? Static 처럼 타입형을 참조하는건가요?

  • python
  • java
  • c
  • 정보처리기사
강범준 댓글 2 좋아요 0 조회수 181

데이터베이스 스키마 자동 생성

미해결

자바 ORM 표준 JPA 프로그래밍 - 기본편

안녕하세요. 데이터베이스 스키마 자동 생성과 관련하여 질문드릴게 있습니다. DDL을 애플리케이션 실행 시점에 자동 생성하는것과 데이터베이스 스키마 자동생성하는것이 어떤 연관관계가 있는것인가요? 데이터베이스 스키마 자동 생성 에 대해서는 자세한 설명을 해주시지않은거 같아서 질문드립니다. JPA에서는 DDL을 애플리케이션 실행시점에 자동으로 생성해서 테이블을 생성해주는데, 이때 엔티티클래스와 매핑정보를 바탕으로 CREATE TABLE 쿼리 내에서 데이터베이스 스키마인 테이블이름이나 컬럼의 데이터 타입이나 제약조건 등등을 자동으로 생성해주는것인가요?

  • java
  • jpa
오리쉐리 댓글 2 좋아요 1 조회수 152

이론 통합 요약본 sql과 조인 정리 페이지에서

해결됨

(2026 최신!) 일주일만에 합격하는 정보처리기사 실기

ddl dml dcl 부분에서 dcl이 리보크랑 그란트가 들어가는걸로 아는데, tcl 부분이 나온거 같아 오타인지 문의드립니당

  • python
  • java
  • c
  • 정보처리기사
고동철 댓글 2 좋아요 0 조회수 170

제가 뭐 건들었는지 안되네요 이유를 알 수 있을까요?

해결됨

[코드캠프] 부트캠프에서 만든 '완벽한' 프론트엔드 코스

// CssModulePage.jsx import styles from "./styles.module.css"; export default function CssModulePage() { return ( <> <button className={styles.버튼스타일}>버튼</button> <div className={styles.네모상자스타일}>네모상자</div> </> ); } .버튼스타일 { background-color: yellow; } .네모상자스타일 { width: 200px; height: 200px; } Server Error Error: The default export is not a React Component in "/section04/04-03-css/page"

  • react
  • react-native
  • 하이브리드-앱
  • graphql
  • next.js
이 규성 댓글 5 좋아요 0 조회수 315

집으로 이동 문제 코드

미해결

자바 코딩테스트 - it 대기업 유제

안녕하세요 강사님 강사님께서 제시해준 답변 코드에서 의문이 있어서 질문드립니다. 여기서 조건절 if(nx <= 10001 && ch[0][nx] == 0){ ~ 를 보면 nx<=10001이 nx<10001이 되어야 되지 않나요? ch가 int[][] ch = new int[2][10001]; 이건데 index out of bound 에러 날 것 같습니다. import java.util.*; class Solution { public int solution(int[] pool, int a, int b, int home){ int[][] ch = new int[2][10001]; for(int x : pool){ ch[0][x] = 1; ch[1][x] = 1; } Queue<int[]> Q = new LinkedList<>(); ch[0][0] = 1; ch[1][0] = 1; Q.offer(new int[]{0, 0}); int L = 0; while(!Q.isEmpty()){ int len = Q.size(); for(int i = 0; i < len; i++){ int[] cur = Q.poll(); if(cur[0] == home) return L; int nx = cur[0] + a; if(nx <= 10001 && ch[0][nx] == 0){ ch[0][nx] = 1; Q.offer(new int[]{nx, 0}); } nx = cur[0] - b; if(nx >= 0 && ch[1][nx] == 0 && cur[1] == 0){ ch[1][nx] = 1; Q.offer(new int[]{nx, 1}); } } L++; } return -1; } public static void main(String[] args){ Solution T = new Solution(); System.out.println(T.solution(new int[]{11, 7, 20}, 3, 2, 10)); System.out.println(T.solution(new int[]{1, 15, 11}, 3, 2, 5)); System.out.println(T.solution(new int[]{9, 15, 35, 30, 20}, 2, 1, 25)); System.out.println(T.solution(new int[]{5, 12, 7, 19, 23}, 3, 5, 18)); System.out.println(T.solution(new int[]{10, 15, 20}, 3, 2, 2)); } }

  • java
  • 코딩-테스트
youngyou1324 댓글 1 좋아요 0 조회수 138

인기 태그

인프런 TOP Writers

주간 인기글