You are creating an Alarm management system. When you create a new alarm, you want it to create an alert that is triggered once at the specified time. Which method should you call on Line 9 to create the timer?
A.
timerService.createCalendarTimer(alarmDate, config);
B.
timerService.createSingleActionTimer(alarmDate, config);
C.
timerService.createIntervalTimer(alarmDate, -l, config);
D.
timerService.createTimer(alarmDate, -l, config);
Answser B. TimerService.createTimer(Date initialExpiration, long intervalDuration, Serializable info)
IllegalArgumentException - If initialExpiration is null, if initialExpiration.getTime() is negative, or if intervalDuration is negative.
upvoted 2 times
...
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
kozionov
Highly Voted 2 years, 8 months agoorjava
Most Recent 7 months ago