(The Time class) Design a class named Time. The class contains:
Data fields hour, minute, and second that represents a time.
A no-arg constructor that creates a Time object for the current time.
A constructor that constructs a Time object with a specified elapse time since midnight, January 1, 1970 in milliseconds. (The data fields value will represent this time.)
Data fields hour, minute, and second that represents a time.
A no-arg constructor that creates a Time object for the current time.
A constructor that constructs a Time object with a specified elapse time since midnight, January 1, 1970 in milliseconds. (The data fields value will represent this time.)
굵게 표신한 부분이 뭘 말하는건지 모르겠어
1970 1월 1일부터 시간이 얼마나 지났냐를 말하는건가?
근데 밀리세컨을 받아서 어떻게 세팅하지......
일단 time class 는 calendar 를 사용하긴 했는데
밀리초 단위 자정 년 1 월 1 1970 년부터 지정된 경과 시간과 시간 객체를 구성하는 생성자. (데이터 필드 값이 시간을 나타내는 것입니다.)
정말 빌어먹을 해석이네 ㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋㅋ 해석을 물어보는게 아니야 형 ㅋㅋㅋㅋㅋㅋ
int totalSecond=(int)milisecond/1000; int time_second=totalSecond%60; int totalminute=totalSecond/60; int time_minute=totalminute%60; int totalhour=totalminute/60; int time_hour=totalhour%24;
이런식으로 하면 되나 ㅋ