-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#20 [feat] 6자리 암호 코드 생성 구현 #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
확인했습니다~~! TestCode 작성까지 👍
|
||
public class VerificationCodeGenerator { | ||
private static final SecureRandom secureRandom = new SecureRandom(); | ||
private static final int START_NUM = 100_000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
p5:
사소한 궁금한점이 생겼는데 상수값 사이에 있는 _은 뭘까요..? STARTNUM이 실수 값으로 어디서부터 되는걸까요..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@hellozo0
저희가 돈 계산할 때 1,000 이런 식으로 표현하는데, 자바에서 _
을 사용해서 000 단위를 분리할 수 있습니다.
100000 -> 10_000
이를 통해 숫자 가독성을 높일 수 있고, 들어가는 값은 똑같이 100000이 들어갑니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
6자리 숫자를 넘기기 때문에
100,000 ~ 999,999 사이의 값을 반환하고 있습니다.,,!
근데 생각해보니 095843 이런 식으로도 할 수 있는데 너무 단편적으로 생각했네요...!
이 점은 후순위로 수정하겠습니다..!
관련 이슈번호
해결하는 데 얼마나 걸렸나요? (예상 작업 시간 / 실제 작업 시간)
해결하려는 문제가 무엇인가요?
어떻게 해결했나요?