Inflearn Community Q&A
생성자에 static 제어자를 쓰는 이유가 있나요?
Written on
·
421
4
public static OrderItem createOrderItem(...){
// ...
}
1. 제목과 동일합니다. 저 같은 경우엔 @Builder를 사용하긴 하는데 빌더패턴보다 더 선호되는 방식인가요?
2. 또한 생성자명을 따로 정하는 이유가 있을까요? 뭔가 의도는 알 거 같기도 한데, 제 추측 말고 정확한 이유가 궁금합니다.
웹앱JPAjavaspring-bootspring
Quiz
What is the main business logic that occurs when an order is cancelled?
Order status changes to 'Shipping'.
Stock of ordered items is decreasing.
Stock of canceled order items is restored.
Even delivered orders can be freely cancelled.






안녕하세요. 탈룰라님 static을 빼보시면 이해가 되실꺼에요.
질문이 오래되어서 혹시 추가 질문이 있으면 새로 질문을 정리해서 남겨주세요^^
감사합니다.